[6] | 1 | # WAeUP CMS Product |
---|
| 2 | # Archetypes based content types for the West African e-University Project web portal |
---|
| 3 | # Copyright (c) 2005 WAeUP |
---|
| 4 | # |
---|
| 5 | # This program is free software; you can redistribute it and/or modify |
---|
| 6 | # it under the terms of the GNU General Public License as published by |
---|
| 7 | # the Free Software Foundation; either version 2 of the License, or |
---|
| 8 | # (at your option) any later version. |
---|
| 9 | # |
---|
| 10 | # This program is distributed in the hope that it will be useful, |
---|
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 13 | # GNU General Public License for more details. |
---|
| 14 | # |
---|
| 15 | # You should have received a copy of the GNU General Public License |
---|
| 16 | # along with this program; if not, write to the Free Software |
---|
| 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
| 18 | # |
---|
| 19 | |
---|
| 20 | from Products.CMFCore.utils import getToolByName |
---|
| 21 | |
---|
| 22 | def modifyMTool(self): |
---|
| 23 | mt=getToolByName(self, 'portal_membership') |
---|
| 24 | |
---|
| 25 | acts=list(mt.listActions()) |
---|
| 26 | selection=[acts.index(a) for a in acts] |
---|
| 27 | mt.deleteActions(selection) |
---|
| 28 | |
---|
| 29 | mt.addAction('mystuff' |
---|
| 30 | ,'My Folder' |
---|
| 31 | ,'string:${portal/portal_membership/getHomeUrl}/folder_contents' |
---|
| 32 | ,'python: member and portal.portal_membership.getHomeFolder()' |
---|
| 33 | ,'View' |
---|
| 34 | ,'user' |
---|
| 35 | , visible=1) |
---|
| 36 | mt.addAction('preferences' |
---|
| 37 | ,'My Preferences' |
---|
| 38 | ,'string:${portal_url}/plone_memberprefs_panel' |
---|
| 39 | ,'member' |
---|
| 40 | ,'View' |
---|
| 41 | ,'user' |
---|
| 42 | , visible=1) |
---|
| 43 | mt.addAction('login' |
---|
[12] | 44 | ,'Secure Login' |
---|
[6] | 45 | ,'python:portal_url.replace("http:","https:")+"/login_form"' |
---|
| 46 | ,'not: member' |
---|
| 47 | ,'View' |
---|
| 48 | ,'user' |
---|
| 49 | , visible=1) |
---|
[12] | 50 | mt.addAction('login' |
---|
| 51 | ,'Unsecure Login' |
---|
| 52 | ,'python:portal_url.replace("https:","http:")+"/login_form"' |
---|
| 53 | ,'not: member' |
---|
| 54 | ,'View' |
---|
| 55 | ,'user' |
---|
| 56 | , visible=1) |
---|
[6] | 57 | mt.addAction('plone_setup' |
---|
| 58 | ,'Site Setup' |
---|
| 59 | ,'string:${portal_url}/plone_control_panel' |
---|
| 60 | ,'' |
---|
| 61 | ,'Manage portal' |
---|
| 62 | ,'user' |
---|
| 63 | , visible=1) |
---|
| 64 | mt.addAction('svnrepos' |
---|
| 65 | ,'SVN Repositories' |
---|
| 66 | ,'string:https://svn.waeup.org/repos/' |
---|
| 67 | ,'member' |
---|
| 68 | ,'View' |
---|
| 69 | ,'user' |
---|
[7] | 70 | , visible=0) |
---|
[6] | 71 | mt.addAction('svninter' |
---|
| 72 | ,'SVN Web Interface' |
---|
| 73 | ,'string:https://svn.waeup.org/' |
---|
| 74 | ,'member' |
---|
| 75 | ,'View' |
---|
| 76 | ,'user' |
---|
| 77 | , visible=1) |
---|
| 78 | mt.addAction('usermanagement' |
---|
| 79 | ,'User Management System' |
---|
| 80 | ,'string:https://waeup.org:20000/' |
---|
| 81 | ,'member' |
---|
| 82 | ,'View' |
---|
| 83 | ,'user' |
---|
| 84 | , visible=1) |
---|
| 85 | mt.addAction('ldap' |
---|
| 86 | ,'LDAP Server' |
---|
| 87 | ,'string:https://ldap.waeup.org/' |
---|
| 88 | ,'member' |
---|
| 89 | ,'View' |
---|
| 90 | ,'user' |
---|
| 91 | , visible=1) |
---|
| 92 | mt.addAction('orgmail' |
---|
| 93 | ,'Org Mailing List' |
---|
| 94 | ,'string:http://lists.waeup.org/mailman/listinfo/org' |
---|
| 95 | ,'' |
---|
| 96 | ,'View' |
---|
| 97 | ,'user' |
---|
| 98 | , visible=1) |
---|
| 99 | mt.addAction('webmail' |
---|
| 100 | ,'Webmail' |
---|
| 101 | ,'string:https://mail.waeup.org' |
---|
| 102 | ,'member' |
---|
| 103 | ,'View' |
---|
| 104 | ,'user' |
---|
| 105 | , visible=1) |
---|
| 106 | mt.addAction('logout' |
---|
| 107 | ,'Log out' |
---|
| 108 | ,'python:portal_url.replace("https:","http:")+"/logout"' |
---|
| 109 | ,'member' |
---|
| 110 | ,'View' |
---|
| 111 | ,'user' |
---|
| 112 | , visible=1) |
---|