Changeset 802

Show
Ignore:
Timestamp:
02/23/07 09:08:04
Author:
crchemist
Message:

Now install function is workable in both 2.1 and 2.5 plones.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qPloneEditorGroup/trunk/Extensions/Install.py

    r801 r802  
    1212    self._addRole('Editor') 
    1313    acl = self.acl_users 
    14     acl.changeOrCreateGroups(roles = ['Editor'], new_groups=['Editors']) 
     14    if acl.meta_type != 'Pluggable Auth Service': 
     15        acl.changeOrCreateGroups(roles = ['Editor'], new_groups=['Editors']) 
     16    else: 
     17        try: 
     18            acl.addRole('Editor') 
     19        except KeyError: 
     20            pass 
     21 
     22        try: 
     23            acl._doAddGroup('Editors', roles = ('Editor',)) 
     24        except KeyError: 
     25            pass 
     26 
    1527    out.write('Added Editors group and Editor role\n') 
    1628