Ignore:
Timestamp:
20 Oct 2005, 07:06:21 (19 years ago)
Author:
joachim
Message:

=install set everything up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup_product/trunk/Extensions/install.py

    r57 r60  
     1#-*- mode: python; mode: fold -*-
    12from Products.CPSInstaller.CPSInstaller import CPSInstaller
    23from Products.CMFCore.CMFCorePermissions import View, ModifyPortalContent
     
    1213  CPSForum = False
    1314
     15from Products.WAeUP.Students import addStudentsFolder
     16
    1417class WAeUPInstaller(CPSInstaller):
    1518    """
     
    2528   
    2629        ##########################################
    27         # Actions
     30        # Actions ###(
    2831        ##########################################
    2932        if CPSSubscriptions:
     
    152155        self.verifyActions(actions)
    153156        ##########################################
    154         # skins
     157###)
     158
     159        # skins
    155160        ##########################################
    156161        self.log("Verifying %(product_name)s skinss" % vars())
     
    186191        self.log("Verifying %(product_name)s vocabularies" % vars())
    187192        self.verifyVocabularies(portal.getWAeUPVocabularies())
    188    
     193        ##########################################
     194        # Groups
     195        ##########################################
     196           
    189197        self.installCustomWorkflows()
    190198        self.verifyWorkflowAssociation()
     
    230238    installer = WAeUPInstaller(self)
    231239    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',))
    232264    return installer.logResult()
Note: See TracChangeset for help on using the changeset viewer.