get_visible_forms docstrings.

pull/7/head
Ferry Boender 10 years ago
parent 20a83c4382
commit f69159f11f
  1. 6
      src/scriptform.py

@ -262,7 +262,11 @@ class FormConfig:
else: else:
raise ValueError("No such form: {0}".format(form_name)) raise ValueError("No such form: {0}".format(form_name))
def get_visible_forms(self, username): def get_visible_forms(self, username=None):
"""
Return a list of all visible forms. Excluded forms are those that have
the 'hide' property set, and where the user has no access to.
"""
form_list = [] form_list = []
for form_def in self.forms: for form_def in self.forms:
if form_def.allowed_users is not None and \ if form_def.allowed_users is not None and \

Loading…
Cancel
Save