Changeset 8774
- Timestamp:
- 22 Jun 2012, 10:40:31 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r8740 r8774 57 57 IPasswordValidator, IContactForm, IKofaUtils, ICSVExporter, 58 58 IChangePassword) 59 from waeup.kofa.permissions import get_users_with_local_roles, get_all_roles 59 from waeup.kofa.permissions import ( 60 get_users_with_local_roles, get_all_roles, get_all_users) 60 61 from waeup.kofa.students.catalog import search as searchstudents 61 62 from waeup.kofa.university.catalog import search … … 1535 1536 1536 1537 def getUsers(self): 1537 """Get a list of all users. 1538 """ 1539 for key, val in grok.getSite()['users'].items(): 1540 url = self.url(val) 1541 yield(dict(url=url, name=key, val=val)) 1538 return get_all_users() 1542 1539 1543 1540 def getUsersWithLocalRoles(self): … … 1722 1719 1723 1720 def getUsers(self): 1724 """Get a list of all users. 1725 """ 1726 for key, val in grok.getSite()['users'].items(): 1727 url = self.url(val) 1728 yield(dict(url=url, name=key, val=val)) 1721 return get_all_users() 1729 1722 1730 1723 def getUsersWithLocalRoles(self): … … 1967 1960 1968 1961 def getUsers(self): 1969 """Get a list of all users. 1970 """ 1971 for key, val in grok.getSite()['users'].items(): 1972 url = self.url(val) 1973 yield(dict(url=url, name=key, val=val)) 1962 return get_all_users() 1974 1963 1975 1964 def getUsersWithLocalRoles(self): -
main/waeup.kofa/trunk/src/waeup/kofa/permissions.py
r8565 r8774 272 272 return sorted(list_of_dict, key=lambda x: x['name']) 273 273 274 def get_all_users(): 275 """Get a list of dictionaries. 276 """ 277 users = sorted(grok.getSite()['users'].items(), key=lambda x: x[1].title) 278 for key, val in users: 279 yield(dict(name=key, val=val)) 280 274 281 def get_users_with_local_roles(context): 275 282 """Get a list of dicts representing the local roles set for `context`.
Note: See TracChangeset for help on using the changeset viewer.