Changeset 3903 for WAeUP_SRP/trunk/patches/PatchCPSUserFolderUserFolder.py
- Timestamp:
- 3 Feb 2009, 08:19:08 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/patches/PatchCPSUserFolderUserFolder.py
r3673 r3903 125 125 break 126 126 allowed = set(('CourseAdviser', 'SectionManager')) 127 elif real_object.portal_type == "Student" and "CourseAdvisers" in groups:128 #we need some special processing since CourseAdvisers are only129 #specified per StudyLevel130 certificate_obj = getCertificateObject(self,st_entry)131 if certificate_obj is None:132 #from pdb import set_trace;set_trace()133 break134 allowed = set(('CourseAdviser', 'SectionManager'))135 for context_obj in certificate_obj.objectValues():136 dynamic_roles = set(self.getRolesInContext(context_obj))137 intersect = dynamic_roles & allowed138 if intersect:139 roles.extend(list(intersect))140 break141 127 else: 142 128 res = self.portal_catalog(portal_type="Department",id=st_entry.department) … … 149 135 if intersect: 150 136 roles.extend(list(intersect)) 137 #from pdb import set_trace;set_trace() 138 139 if real_object.portal_type == "Student" and "CourseAdvisers" in groups: 140 #we need some special processing since CourseAdvisers are only 141 #specified per StudyLevel 142 certificate_obj = getCertificateObject(self,st_entry) 143 if certificate_obj is None: 144 #from pdb import set_trace;set_trace() 145 break 146 allowed = set(('CourseAdviser', 'SectionManager')) 147 for context_obj in certificate_obj.objectValues(): 148 dynamic_roles = set(self.getRolesInContext(context_obj)) 149 intersect2 = dynamic_roles & allowed 150 if intersect2: 151 roles.extend(list(intersect2)) 152 151 153 break 152 154 return roles
Note: See TracChangeset for help on using the changeset viewer.