Ignore:
Timestamp:
13 Dec 2011, 07:30:25 (13 years ago)
Author:
Henrik Bettermann
Message:

Make local roles assignable in certificate containers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r7334 r7335  
    17151715    tabtwoactions = ['Add course referrer',
    17161716                     'Remove selected course referrers','Cancel']
     1717    tabthreeactions1 = ['Remove selected local roles']
     1718    tabthreeactions2 = ['Add local role']
    17171719
    17181720    @property
     
    17511753        self.redirect(self.url(self.context))
    17521754        return
     1755
     1756    def getLocalRoles(self):
     1757        roles = ILocalRolesAssignable(self.context)
     1758        return roles()
     1759
     1760    def getUsers(self):
     1761        """Get a list of all users.
     1762        """
     1763        for key, val in grok.getSite()['users'].items():
     1764            url = self.url(val)
     1765            yield(dict(url=url, name=key, val=val))
     1766
     1767    def getUsersWithLocalRoles(self):
     1768        return get_users_with_local_roles(self.context)
     1769
     1770    @grok.action('Add local role', validator=NullValidator)
     1771    def addLocalRole(self, **data):
     1772        return add_local_role(self, 3, **data)
     1773
     1774    @grok.action('Remove selected local roles')
     1775    def delLocalRoles(self, **data):
     1776        return del_local_roles(self,3,**data)
    17531777
    17541778
Note: See TracChangeset for help on using the changeset viewer.