Changeset 7819 for main/waeup.kofa/trunk/src/waeup/kofa/permissions.py
- Timestamp:
- 8 Mar 2012, 22:28:46 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/permissions.py
r7811 r7819 168 168 169 169 def get_waeup_roles(also_local=False): 170 """Get all K OFAroles.171 172 K OFAroles are ordinary roles whose id by convention starts with170 """Get all Kofa roles. 171 172 Kofa roles are ordinary roles whose id by convention starts with 173 173 a ``waeup.`` prefix. 174 174 175 175 If `also_local` is ``True`` (``False`` by default), also local 176 roles are returned. Local K OFAroles are such whose id starts176 roles are returned. Local Kofa roles are such whose id starts 177 177 with ``waeup.local.`` prefix (this is also a convention). 178 178 … … 181 181 for name, item in get_all_roles(): 182 182 if not name.startswith('waeup.'): 183 # Ignore non-K OFAroles...183 # Ignore non-Kofa roles... 184 184 continue 185 185 if not also_local and name.startswith('waeup.local.'): … … 189 189 190 190 def get_waeup_role_names(): 191 """Get the ids of all K OFAroles.192 193 See :func:`get_waeup_roles` for what a 'K OFARole' is.194 195 This function returns a sorted list of K OFArole names.191 """Get the ids of all Kofa roles. 192 193 See :func:`get_waeup_roles` for what a 'KofaRole' is. 194 195 This function returns a sorted list of Kofa role names. 196 196 """ 197 197 return sorted([x.id for x in get_waeup_roles()])
Note: See TracChangeset for help on using the changeset viewer.