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' |
---|
44 | ,'Log in' |
---|
45 | ,'python:portal_url.replace("http:","https:")+"/login_form"' |
---|
46 | ,'not: member' |
---|
47 | ,'View' |
---|
48 | ,'user' |
---|
49 | , visible=1) |
---|
50 | mt.addAction('plone_setup' |
---|
51 | ,'Site Setup' |
---|
52 | ,'string:${portal_url}/plone_control_panel' |
---|
53 | ,'' |
---|
54 | ,'Manage portal' |
---|
55 | ,'user' |
---|
56 | , visible=1) |
---|
57 | mt.addAction('svnrepos' |
---|
58 | ,'SVN Repositories' |
---|
59 | ,'string:https://svn.waeup.org/repos/' |
---|
60 | ,'member' |
---|
61 | ,'View' |
---|
62 | ,'user' |
---|
63 | , visible=1) |
---|
64 | mt.addAction('svninter' |
---|
65 | ,'SVN Web Interface' |
---|
66 | ,'string:https://svn.waeup.org/' |
---|
67 | ,'member' |
---|
68 | ,'View' |
---|
69 | ,'user' |
---|
70 | , visible=1) |
---|
71 | mt.addAction('usermanagement' |
---|
72 | ,'User Management System' |
---|
73 | ,'string:https://waeup.org:20000/' |
---|
74 | ,'member' |
---|
75 | ,'View' |
---|
76 | ,'user' |
---|
77 | , visible=1) |
---|
78 | mt.addAction('ldap' |
---|
79 | ,'LDAP Server' |
---|
80 | ,'string:https://ldap.waeup.org/' |
---|
81 | ,'member' |
---|
82 | ,'View' |
---|
83 | ,'user' |
---|
84 | , visible=1) |
---|
85 | mt.addAction('orgmail' |
---|
86 | ,'Org Mailing List' |
---|
87 | ,'string:http://lists.waeup.org/mailman/listinfo/org' |
---|
88 | ,'' |
---|
89 | ,'View' |
---|
90 | ,'user' |
---|
91 | , visible=1) |
---|
92 | mt.addAction('webmail' |
---|
93 | ,'Webmail' |
---|
94 | ,'string:https://mail.waeup.org' |
---|
95 | ,'member' |
---|
96 | ,'View' |
---|
97 | ,'user' |
---|
98 | , visible=1) |
---|
99 | mt.addAction('logout' |
---|
100 | ,'Log out' |
---|
101 | ,'python:portal_url.replace("https:","http:")+"/logout"' |
---|
102 | ,'member' |
---|
103 | ,'View' |
---|
104 | ,'user' |
---|
105 | , visible=1) |
---|