Changeset a4433d in indico for indico/MaKaC/services/implementation/conference.py
- Timestamp:
- 01/12/12 15:34:53 (17 months ago)
- Branches:
- master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 4c7d4152dff271ba5df5a8606605969cab454080
- Children:
- 10a79e
- Parents:
- 9d1c69
- git-author:
- Alexis Castilla Hernandez <alexis.castilla.hernandez@…> (07/08/11 11:25:39)
- git-committer:
- Jose Benito <jose.benito.gonzalez@…> (01/12/12 15:34:53)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/services/implementation/conference.py
rcb55f2 ra4433d 1103 1103 return fossilize(self._conf.getParticipation().getParticipantList()) 1104 1104 1105 1106 class ConferenceManagerListBase(ConferenceModifBase): 1107 1108 def _getManagersList(self): 1109 result = fossilize(self._conf.getManagerList()) 1110 # get pending users 1111 for email in self._conf.getAccessController().getModificationEmail(): 1112 pendingUser = {} 1113 pendingUser["email"] = email 1114 pendingUser["pending"] = True 1115 result.append(pendingUser) 1116 return result 1117 1118 1119 class ConferenceProtectionGetManagerList(ConferenceManagerListBase): 1120 1121 def _getAnswer(self): 1122 return self._getManagersList() 1123 1124 1125 class ConferenceProtectionAddExistingManager(ConferenceManagerListBase): 1126 1127 def _checkParams(self): 1128 ConferenceManagerListBase._checkParams(self) 1129 pm = ParameterManager(self._params) 1130 self._userList = pm.extract("userList", pType=list, allowEmpty=False) 1131 1132 def _getAnswer(self): 1133 ph = PrincipalHolder() 1134 for user in self._userList: 1135 self._conf.grantModification(ph.getById(user["id"])) 1136 return self._getManagersList() 1137 1138 1139 class ConferenceProtectionRemoveManager(ConferenceManagerListBase): 1140 1141 def _checkParams(self): 1142 ConferenceManagerListBase._checkParams(self) 1143 pm = ParameterManager(self._params) 1144 self._managerId = pm.extract("userId", pType=str, allowEmpty=False) 1145 self._kindOfUser = pm.extract("kindOfUser", pType=str, allowEmpty=False) 1146 1147 def _getAnswer(self): 1148 if self._kindOfUser == "pending": 1149 # remove pending email, self._submitterId is an email address 1150 self._conf.getAccessController().revokeModificationEmail(self._managerId) 1151 elif self._kindOfUser == "principal": 1152 ph = PrincipalHolder() 1153 self._conf.revokeModification(ph.getById(self._managerId)) 1154 return self._getManagersList() 1105 1155 1106 1156 … … 1146 1196 "protection.changeContactInfo": ConferenceContactInfoModification, 1147 1197 "alarm.sendTestNow": ConferenceAlarmSendTestNow, 1198 "protection.addExistingManager": ConferenceProtectionAddExistingManager, 1199 "protection.removeManager": ConferenceProtectionRemoveManager, 1200 "protection.getManagerList": ConferenceProtectionGetManagerList, 1148 1201 "participant.addExistingParticipant": ConferenceParticipantAddExisting, 1149 1202 "participant.addNewParticipant": ConferenceParticipantAddNew
Note: See TracChangeset
for help on using the changeset viewer.
