Changeset 5871 for main/waeup.plonetheme/trunk/waeup/plonetheme/adapter.py
- Timestamp:
- 17 Mar 2011, 21:18:36 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.plonetheme/trunk/waeup/plonetheme/adapter.py
r5870 r5871 1 1 from plone.app.users.browser.personalpreferences import UserDataPanelAdapter 2 from Products.CMFCore.utils import getToolByName 2 3 3 4 class EnhancedUserDataPanelAdapter(UserDataPanelAdapter): 4 5 """ 5 6 """ 7 6 8 def get_position(self): 7 9 return self.context.getProperty('position', '') 8 10 def set_position(self, value): 11 membership = getToolByName(self.context, 'portal_membership') 12 if not membership.checkPermission('Manage portal', self.context): 13 return 9 14 return self.context.setMemberProperties({'position': value}) 10 15 position = property(get_position, set_position)
Note: See TracChangeset for help on using the changeset viewer.