Ignore:
Timestamp:
20 May 2011, 09:38:41 (13 years ago)
Author:
Henrik Bettermann
Message:

Change class attribute from list of dicts to dict. This makes configuration less error-prone.

File:
1 edited

Legend:

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

    r6159 r6160  
    130130        to assign each role to).
    131131        """
    132         return self._roles
     132        list_of_dict = [dict(name=x, title=self._roles[x]) for x in self._roles.keys()]
     133        return list_of_dict
    133134
    134135    def roles(self):
    135136        """Return a list of roles assignable to the context object.
    136137        """
    137         return [x['name'] for x in self._roles]
     138        return self._roles.keys()
Note: See TracChangeset for help on using the changeset viewer.