Changeset 7321 for main/waeup.sirp/trunk/src/waeup/sirp/permissions.py
- Timestamp:
- 10 Dec 2011, 06:15:17 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/permissions.py
r7250 r7321 128 128 129 129 def get_waeup_roles(also_local=False): 130 """Get all WAeUP roles.131 132 WAeUP roles are ordinary roles whose id by convention starts with130 """Get all SIRP roles. 131 132 SIRP roles are ordinary roles whose id by convention starts with 133 133 a ``waeup.`` prefix. 134 134 135 135 If `also_local` is ``True`` (``False`` by default), also local 136 roles are returned. Local WAeUP roles are such whose id starts136 roles are returned. Local SIRP roles are such whose id starts 137 137 with ``waeup.local.`` prefix (this is also a convention). 138 138 … … 141 141 for name, item in get_all_roles(): 142 142 if not name.startswith('waeup.'): 143 # Ignore non- WAeUP roles...143 # Ignore non-SIRP roles... 144 144 continue 145 145 if not also_local and name.startswith('waeup.local.'): … … 149 149 150 150 def get_waeup_role_names(): 151 """Get the ids of all WAeUP roles.152 153 See :func:`get_waeup_roles` for what a ' WAeUPRole' is.154 155 This function returns a sorted list of WAeUP role names.151 """Get the ids of all SIRP roles. 152 153 See :func:`get_waeup_roles` for what a 'SIRPRole' is. 154 155 This function returns a sorted list of SIRP role names. 156 156 """ 157 157 return sorted([x.id for x in get_waeup_roles()])
Note: See TracChangeset for help on using the changeset viewer.