Last change
on this file since 11152 was
10049,
checked in by Henrik Bettermann, 12 years ago
|
Fill trunc.
|
-
Property svn:keywords set to
Id
|
File size:
916 bytes
|
Line | |
---|
1 | from plone.app.users.browser.personalpreferences import UserDataPanelAdapter |
---|
2 | from Products.CMFCore.utils import getToolByName |
---|
3 | |
---|
4 | class EnhancedUserDataPanelAdapter(UserDataPanelAdapter): |
---|
5 | """ |
---|
6 | """ |
---|
7 | |
---|
8 | def get_position(self): |
---|
9 | return self.context.getProperty('position', '') |
---|
10 | def set_position(self, value): |
---|
11 | membership = getToolByName(self.context, 'portal_membership') |
---|
12 | if not membership.checkPermission('Manage portal', self.context): |
---|
13 | return |
---|
14 | return self.context.setMemberProperties({'position': value}) |
---|
15 | position = property(get_position, set_position) |
---|
16 | |
---|
17 | def get_company(self): |
---|
18 | return self.context.getProperty('company', '') |
---|
19 | def set_company(self, value): |
---|
20 | membership = getToolByName(self.context, 'portal_membership') |
---|
21 | return self.context.setMemberProperties({'company': value}) |
---|
22 | company = property(get_company, set_company) |
---|
23 | |
---|
24 | |
---|
25 | |
---|
Note: See
TracBrowser for help on using the repository browser.