Changeset 60 for waeup_product/trunk/Extensions
- Timestamp:
- 20 Oct 2005, 07:06:21 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/Extensions/install.py
r57 r60 1 #-*- mode: python; mode: fold -*- 1 2 from Products.CPSInstaller.CPSInstaller import CPSInstaller 2 3 from Products.CMFCore.CMFCorePermissions import View, ModifyPortalContent … … 12 13 CPSForum = False 13 14 15 from Products.WAeUP.Students import addStudentsFolder 16 14 17 class WAeUPInstaller(CPSInstaller): 15 18 """ … … 25 28 26 29 ########################################## 27 # Actions 30 # Actions ###( 28 31 ########################################## 29 32 if CPSSubscriptions: … … 152 155 self.verifyActions(actions) 153 156 ########################################## 154 # skins 157 ###) 158 159 # skins 155 160 ########################################## 156 161 self.log("Verifying %(product_name)s skinss" % vars()) … … 186 191 self.log("Verifying %(product_name)s vocabularies" % vars()) 187 192 self.verifyVocabularies(portal.getWAeUPVocabularies()) 188 193 ########################################## 194 # Groups 195 ########################################## 196 189 197 self.installCustomWorkflows() 190 198 self.verifyWorkflowAssociation() … … 230 238 installer = WAeUPInstaller(self) 231 239 installer.install(self) 240 dirtool = getattr(self,'portal_directories') 241 groups = dirtool.groups 242 for newEntry in ('Students','StudentManager'): 243 if newEntry not in groups.listEntryIds(): 244 groups.createEntry({'group': newEntry, 245 'members': []}) 246 groups.manage_setLocalGroupRoles(groupid = 'StudentManager',roles=('Manager',)) 247 #groups.manage_setLocalGroupRoles(groupid = 'Students',roles=('Contributor',)) 248 sections = getattr(self,'sections') 249 waeup = getattr(sections,'waeup',None) 250 if not waeup: 251 sections.content_create(type_name='University',title='waeup') 252 sections.waeup.folder_localrole_add(member_ids=('group:Students',), 253 member_role='SectionReviewer', 254 ) 255 sections.waeup.content_create(type_name='StudentsFolder',title='students') 256 sections.waeup.folder_localrole_add(member_ids=('group:Students',), 257 member_role='SectionReviewer', 258 ) 259 sections.waeup.folder_localrole_add(member_ids=('group:StudentManager',), 260 member_role='SectionManager', 261 ) 262 sections.waeup.students.manage_setLocalGroupRoles(groupid = 'role:Anonymous',roles=('SectionReader',)) 263 sections.waeup.students.manage_setLocalGroupRoles(groupid = 'Students',roles=('Contributor',)) 232 264 return installer.logResult()
Note: See TracChangeset for help on using the changeset viewer.