Changeset 2468


Ignore:
Timestamp:
11/13/07 17:18:13 (7 years ago)
Author:
cxe5014@…
Message:

Removed global role designators from the schema for Classification and Committee. There's no reason why these two groups should be able to assign a global role in a site for all their members.

Refs #297

Location:
weblion/FacultyStaffDirectory/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • weblion/FacultyStaffDirectory/trunk/Classification.py

    r2449 r2468  
    2020from Products.membrane.config import TOOLNAME as MEMBRANE_TOOL 
    2121from Products.membrane.utils import generateCategorySetIdForType 
    22 from Products.membrane.utils import getFilteredValidRolesForPortal 
    2322from Products.FacultyStaffDirectory.interfaces.classification import IClassification, IClassificationExtender 
    2423from Products.SchemaExtensibility.schema import SchemaExtensibility 
     
    4645        relationship='classifications_people' 
    4746    ), 
    48      
    49     LinesField('roles_', 
    50         accessor='getRoles', 
    51         mutator='setRoles', 
    52         edit_accessor='getRawRoles', 
    53         languageIndependent=True, 
    54         vocabulary='getRoleSet', 
    55         multiValued=1, 
    56         write_permission=ManageUsers, 
    57         widget=MultiSelectionWidget( 
    58             label=u'Roles', 
    59             description=u"The roles all employees in this department will have", 
    60             ), 
    61         ), 
    6247), 
    6348) 
     
    11499        pList.sort() 
    115100        return [tup[-1] for tup in pList] 
    116          
    117     security.declarePrivate('getRoleSet') 
    118     def getRoleSet(self): 
    119         """Get the roles vocabulary to use 
    120         """ 
    121         portal_roles = getFilteredValidRolesForPortal(self) 
    122         allowed_roles = [r for r in portal_roles if r not in INVALID_ROLES] 
    123         return allowed_roles 
    124101     
    125102    # 
  • weblion/FacultyStaffDirectory/trunk/Committee.py

    r2467 r2468  
    1515from Products.CMFCore.utils import getToolByName 
    1616from Products.membrane.interfaces import IPropertiesProvider, ICategoryMapper 
    17 from Products.membrane.utils import getFilteredValidRolesForPortal 
    1817from Products.FacultyStaffDirectory.interfaces.committee import ICommittee, ICommitteeExtender, ICommitteeModifiedEvent 
    1918from Acquisition import aq_inner, aq_parent 
     
    3938        relationship='CommitteeMembership' 
    4039    ), 
    41      
    42     LinesField('localroles', 
    43         accessor='getRoles', 
    44         mutator='setRoles', 
    45         edit_accessor='getRawRoles', 
    46         languageIndependent=True, 
    47         vocabulary='getRoleSet', 
    48         multiValued=1, 
    49         write_permission=CHANGE_ROLES, 
    50         widget=MultiSelectionWidget( 
    51             label=u'Roles', 
    52             description=u"The roles all people belonging to committee will have", 
    53             ), 
    54         ), 
    5540), 
    5641) 
     
    132117        return self.getRawMembers() 
    133118 
    134     security.declarePrivate('getRoleSet') 
    135     def getRoleSet(self): 
    136         """Get the roles vocabulary to use 
    137         """ 
    138         portal_roles = getFilteredValidRolesForPortal(self) 
    139         allowed_roles = [r for r in portal_roles if r not in INVALID_ROLES] 
    140         return allowed_roles 
    141  
    142119    # 
    143120    # Validators 
Note: See TracChangeset for help on using the changeset viewer.