当前位置: 首页>>代码示例>>Python>>正文


Python user.PrincipalHolder类代码示例

本文整理汇总了Python中MaKaC.user.PrincipalHolder的典型用法代码示例。如果您正苦于以下问题:Python PrincipalHolder类的具体用法?Python PrincipalHolder怎么用?Python PrincipalHolder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了PrincipalHolder类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _getAnswer

 def _getAnswer( self):
     ph = PrincipalHolder()
     for user in self._userList:
         pr = ph.getById(user["id"])
         if pr != None:
             self._wm.addManager(pr)
     return fossilize(self._wm.getManagers())
开发者ID:aninhalacerda,项目名称:indico,代码行数:7,代码来源:admin.py

示例2: _getAnswer

 def _getAnswer(self):
     ph = PrincipalHolder()
     if self._kindOfList == "modification":
         self._categ.revokeModification(ph.getById(self._userId))
     elif self._kindOfList == "confCreation":
         self._categ.revokeConferenceCreation(ph.getById(self._userId))
     return self._getControlUserList()
开发者ID:vstitches,项目名称:indico,代码行数:7,代码来源:category.py

示例3: _getAnswer

 def _getAnswer(self):
     ph = PrincipalHolder()
     for user in self._userList:
         if self._kindOfList == "manager":
             self._session.grantModification(ph.getById(user["id"]))
         elif self._kindOfList == "coordinator":
             self._session.addCoordinator(ph.getById(user["id"]))
     return self._getSessionChairList()
开发者ID:bubbas,项目名称:indico,代码行数:8,代码来源:session.py

示例4: _getAnswer

 def _getAnswer(self):
     ah = PrincipalHolder()
     for user in self._userList:
         av = ah.getById(user["id"])
         if av is None:
             raise NoReportError(_("The user with email %s that you are adding does not exist anymore in the database") % user["email"])
         self._contribution.grantSubmission(av)
     return self._getSubmittersList()
开发者ID:ferhatelmas,项目名称:indico,代码行数:8,代码来源:contribution.py

示例5: _getAnswer

 def _getAnswer( self):
     ph = PrincipalHolder()
     pr = ph.getById(self._userId)
     if pr != None:
         self._wm.removeManager(pr)
     elif not self._wm.removeManagerById(self._userId):
         raise ServiceError("ER-U0", _("Cannot find user with id %s") % self._userId)
     return fossilize(self._wm.getManagers())
开发者ID:Ictp,项目名称:indico,代码行数:8,代码来源:admin.py

示例6: _getAnswer

 def _getAnswer(self):
     ph = PrincipalHolder()
     for user in self._userList:
         if self._kindOfList == "modification":
             self._categ.grantModification(ph.getById(user["id"]))
         elif self._kindOfList == "confCreation":
             self._categ.grantConferenceCreation(ph.getById(user["id"]))
     return self._getControlUserList()
开发者ID:bubbas,项目名称:indico,代码行数:8,代码来源:category.py

示例7: _getAnswer

 def _getAnswer(self):
     ph = PrincipalHolder()
     for user in self._userList:
         person = ph.getById(user["id"])
         if person is None:
             raise NoReportError(_("The user with email %s that you are adding does not exist anymore in the database") % user["email"])
         if self._kindOfList == "manager":
             self._session.grantModification(person)
         elif self._kindOfList == "coordinator":
             self._session.addCoordinator(person)
     return self._getSessionChairList()
开发者ID:VishrutMehta,项目名称:indico,代码行数:11,代码来源:session.py

示例8: _getAnswer

 def _getAnswer(self):
     if self._kindOfUser == "pending":
         # remove pending email, self._submitterId is an email address
         self._contribution.revokeSubmissionEmail(self._submitterId)
     else:
         ah = PrincipalHolder()
         av = ah.getById(self._submitterId)
         if av is not None:
             # remove submitter
             self._contribution.revokeSubmission(av)
         else:
             raise ServiceError("ERR-U0", _("User does not exist."))
     return self._getSubmittersList()
开发者ID:bubbas,项目名称:indico,代码行数:13,代码来源:contribution.py


注:本文中的MaKaC.user.PrincipalHolder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。