[1] | 1 | from Products.CMFCore.utils import getToolByName
|
---|
| 2 |
|
---|
| 3 | def modifyMTool(self):
|
---|
| 4 | mt=getToolByName(self, 'portal_membership')
|
---|
| 5 |
|
---|
| 6 | acts=list(mt.listActions())
|
---|
| 7 | selection=[acts.index(a) for a in acts]
|
---|
| 8 | mt.deleteActions(selection)
|
---|
| 9 |
|
---|
| 10 | mt.addAction('mystuff'
|
---|
| 11 | ,'My Folder'
|
---|
| 12 | ,'string:${portal/portal_membership/getHomeUrl}/folder_contents'
|
---|
| 13 | ,'python: member and portal.portal_membership.getHomeFolder()'
|
---|
| 14 | ,'View'
|
---|
| 15 | ,'user'
|
---|
| 16 | , visible=1)
|
---|
| 17 | mt.addAction('preferences'
|
---|
| 18 | ,'My Preferences'
|
---|
| 19 | ,'string:${portal_url}/plone_memberprefs_panel'
|
---|
| 20 | ,'member'
|
---|
| 21 | ,'View'
|
---|
| 22 | ,'user'
|
---|
| 23 | , visible=1)
|
---|
| 24 | mt.addAction('login'
|
---|
| 25 | ,'Log in'
|
---|
| 26 | ,'python:portal_url.replace("http:","https:")+"/login_form"'
|
---|
| 27 | ,'not: member'
|
---|
| 28 | ,'View'
|
---|
| 29 | ,'user'
|
---|
| 30 | , visible=1)
|
---|
| 31 | mt.addAction('plone_setup'
|
---|
| 32 | ,'Site Setup'
|
---|
| 33 | ,'string:${portal_url}/plone_control_panel'
|
---|
| 34 | ,''
|
---|
| 35 | ,'Manage portal'
|
---|
| 36 | ,'user'
|
---|
| 37 | , visible=1)
|
---|
| 38 | mt.addAction('svnrepos'
|
---|
| 39 | ,'SVN Repositories'
|
---|
| 40 | ,'string:https://svn.waeup.org/repos/'
|
---|
| 41 | ,'member'
|
---|
| 42 | ,'View'
|
---|
| 43 | ,'user'
|
---|
| 44 | , visible=1)
|
---|
| 45 | mt.addAction('svninter'
|
---|
| 46 | ,'SVN Web Interface'
|
---|
| 47 | ,'string:https://svn.waeup.org/'
|
---|
| 48 | ,'member'
|
---|
| 49 | ,'View'
|
---|
| 50 | ,'user'
|
---|
| 51 | , visible=1)
|
---|
| 52 | mt.addAction('usermanagement'
|
---|
| 53 | ,'User Management System'
|
---|
| 54 | ,'string:https://waeup.org:20000/'
|
---|
| 55 | ,'member'
|
---|
| 56 | ,'View'
|
---|
| 57 | ,'user'
|
---|
| 58 | , visible=1)
|
---|
| 59 | mt.addAction('ldap'
|
---|
| 60 | ,'LDAP Server'
|
---|
| 61 | ,'string:https://ldap.waeup.org/'
|
---|
| 62 | ,'member'
|
---|
| 63 | ,'View'
|
---|
| 64 | ,'user'
|
---|
| 65 | , visible=1)
|
---|
| 66 | mt.addAction('webmail'
|
---|
| 67 | ,'Webmail'
|
---|
| 68 | ,'string:https://mail.waeup.org'
|
---|
| 69 | ,'member'
|
---|
| 70 | ,'View'
|
---|
| 71 | ,'user'
|
---|
| 72 | , visible=1)
|
---|
| 73 | mt.addAction('logout'
|
---|
| 74 | ,'Log out'
|
---|
| 75 | ,'python:portal_url.replace("https:","http:")+"/logout"'
|
---|
| 76 | ,'member'
|
---|
| 77 | ,'View'
|
---|
| 78 | ,'user'
|
---|
| 79 | , visible=1) |
---|