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


Python RHConferenceModifBase._checkProtection方法代码示例

本文整理汇总了Python中MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase._checkProtection方法的典型用法代码示例。如果您正苦于以下问题:Python RHConferenceModifBase._checkProtection方法的具体用法?Python RHConferenceModifBase._checkProtection怎么用?Python RHConferenceModifBase._checkProtection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase的用法示例。


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

示例1: _checkProtection

# 需要导入模块: from MaKaC.webinterface.rh.conferenceModif import RHConferenceModifBase [as 别名]
# 或者: from MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase import _checkProtection [as 别名]
    def _checkProtection(self):
        if not PluginsHolder().hasPluginType("statistics"):
            raise PluginError(_("Statistics plugin is not active."))

        self._checkSessionUser()

        RHConferenceModifBase._checkProtection(self)
开发者ID:aninhalacerda,项目名称:indico,代码行数:9,代码来源:chrome.py

示例2: _checkProtection

# 需要导入模块: from MaKaC.webinterface.rh.conferenceModif import RHConferenceModifBase [as 别名]
# 或者: from MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase import _checkProtection [as 别名]
 def _checkProtection(self):
     self.protection_overridden = False
     can_modify_plugin = session.user and self.plugin.can_be_modified(session.user, self._conf)
     can_modify_event = self._conf.canModify(self.getAW())
     self.protection_overridden = can_modify_plugin and not can_modify_event
     if not can_modify_plugin and not can_modify_event:
         RHConferenceModifBase._checkProtection(self)
     return True
开发者ID:svdoever,项目名称:indico,代码行数:10,代码来源:controllers.py

示例3: _checkProtection

# 需要导入模块: from MaKaC.webinterface.rh.conferenceModif import RHConferenceModifBase [as 别名]
# 或者: from MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase import _checkProtection [as 别名]
 def _checkProtection(self):
     if self._target.hasEnabledSection("paperReviewing"):
         confReview = self._conf.getConfReview()
         user = self.getAW().getUser()
         if not (confReview.isReferee(user) or confReview.isEditor(user) or confReview.isReviewer(user)):
             RHConferenceModifBase._checkProtection(self);
     else:
         raise MaKaCError(_("Paper Reviewing is not active for this conference"))
开发者ID:lukasnellen,项目名称:indico,代码行数:10,代码来源:reviewingListContribToJudge.py

示例4: _checkProtection

# 需要导入模块: from MaKaC.webinterface.rh.conferenceModif import RHConferenceModifBase [as 别名]
# 或者: from MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase import _checkProtection [as 别名]
    def _checkProtection(self):
        self._checkSessionUser()

        hasRights = (not self._cannotViewTab) and \
                    (RCCollaborationAdmin.hasRights(self._getUser()) or
                     RCCollaborationPluginAdmin.hasRights(self._getUser(), self._tabPlugins) or
                     RCVideoServicesManager.hasRights(self._getUser(), self._conf, self._tabPlugins) )

        if not hasRights:
            RHConferenceModifBase._checkProtection(self)
开发者ID:ferhatelmas,项目名称:indico,代码行数:12,代码来源:handlers.py

示例5: _checkProtection

# 需要导入模块: from MaKaC.webinterface.rh.conferenceModif import RHConferenceModifBase [as 别名]
# 或者: from MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase import _checkProtection [as 别名]
 def _checkProtection(self):
     if not PluginsHolder().hasPluginType("Collaboration"):
         raise PluginError("Collaboration plugin system is not active")
     
     hasRights = RCCollaborationAdmin.hasRights(self, None) or \
                 RCCollaborationPluginAdmin.hasRights(self, None, self._tabPlugins) or \
                 RCVideoServicesManager.hasRights(self, self._tabPlugins)
     
     if not hasRights:
         RHConferenceModifBase._checkProtection(self)
开发者ID:lukasnellen,项目名称:indico,代码行数:12,代码来源:collaboration.py

示例6: _checkProtection

# 需要导入模块: from MaKaC.webinterface.rh.conferenceModif import RHConferenceModifBase [as 别名]
# 或者: from MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase import _checkProtection [as 别名]
 def _checkProtection(self):
     self.protection_overridden = False
     if hasattr(self, 'definition'):
         # check if user can manage *that* request
         can_manage_request = session.user and self.definition.can_be_managed(session.user)
     else:
         # check if user can manage any request
         can_manage_request = session.user and is_request_manager(session.user)
     can_manage_event = self._conf.canModify(self.getAW())
     self.protection_overridden = can_manage_request and not can_manage_event
     if not can_manage_request and not can_manage_event:
         RHConferenceModifBase._checkProtection(self)
开发者ID:dbourillot,项目名称:indico,代码行数:14,代码来源:controllers.py

示例7: _checkProtection

# 需要导入模块: from MaKaC.webinterface.rh.conferenceModif import RHConferenceModifBase [as 别名]
# 或者: from MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase import _checkProtection [as 别名]
 def _checkProtection(self):
     if not self.session or self.session_management_level == SessionManagementLevel.none:
         RHConferenceModifBase._checkProtection(self)
     else:
         if self.session_management_level == SessionManagementLevel.manage:
             func = lambda u: self.session.can_manage(u)
         elif self.session_management_level == SessionManagementLevel.coordinate_with_blocks:
             func = lambda u: self.session.can_manage_blocks(u)
         elif self.session_management_level == SessionManagementLevel.coordinate_with_contribs:
             func = lambda u: self.session.can_manage_contributions(u)
         elif self.session_management_level == SessionManagementLevel.coordinate:
             func = lambda u: self.session.can_manage(u, role='coordinate')
         else:
             raise Exception("Invalid session management level")
         if not func(session.user):
             raise Forbidden
开发者ID:OmeGak,项目名称:indico,代码行数:18,代码来源:__init__.py

示例8: _checkProtection

# 需要导入模块: from MaKaC.webinterface.rh.conferenceModif import RHConferenceModifBase [as 别名]
# 或者: from MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase import _checkProtection [as 别名]
 def _checkProtection(self):
     RHConferenceModifBase._checkProtection(self)
     if not can_lock(self._conf, session.user):
         raise Forbidden
开发者ID:MichelCordeiro,项目名称:indico,代码行数:6,代码来源:controllers.py

示例9: _checkProtection

# 需要导入模块: from MaKaC.webinterface.rh.conferenceModif import RHConferenceModifBase [as 别名]
# 或者: from MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase import _checkProtection [as 别名]
 def _checkProtection(self):
     if self._target.hasEnabledSection("paperReviewing"):
         if not RCPaperReviewManager.hasRights(self) and not RCReferee.hasRights(self):
             RHConferenceModifBase._checkProtection(self);
     else:
         raise MaKaCError(_("Paper Reviewing is not active for this conference"))
开发者ID:lukasnellen,项目名称:indico,代码行数:8,代码来源:reviewingAssignContributions.py

示例10: _checkProtection

# 需要导入模块: from MaKaC.webinterface.rh.conferenceModif import RHConferenceModifBase [as 别名]
# 或者: from MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase import _checkProtection [as 别名]
 def _checkProtection(self):
     RHConferenceModifBase._checkProtection(self)
     RHRoomBookingBase._checkProtection(self)
开发者ID:pferreir,项目名称:indico-backup,代码行数:5,代码来源:event.py

示例11: _checkProtection

# 需要导入模块: from MaKaC.webinterface.rh.conferenceModif import RHConferenceModifBase [as 别名]
# 或者: from MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase import _checkProtection [as 别名]
 def _checkProtection(self):
     if not self._isReviewingStaff:
         RHConferenceModifBase._checkProtection(self)
开发者ID:VishrutMehta,项目名称:indico,代码行数:5,代码来源:reviewingModif.py

示例12: _checkProtection

# 需要导入模块: from MaKaC.webinterface.rh.conferenceModif import RHConferenceModifBase [as 别名]
# 或者: from MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase import _checkProtection [as 别名]
 def _checkProtection(self):
     if self._target.hasEnabledSection("paperReviewing"):
         RHConferenceModifBase._checkProtection(self)
     else:
         raise MaKaCError(_("Paper Reviewing is not active for this conference"))
开发者ID:bubbas,项目名称:indico,代码行数:7,代码来源:reviewingControlModif.py

示例13: _checkProtection

# 需要导入模块: from MaKaC.webinterface.rh.conferenceModif import RHConferenceModifBase [as 别名]
# 或者: from MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase import _checkProtection [as 别名]
 def _checkProtection( self ):
     instantMessagingAdmins = []
     for imPlugin in PluginsHolder().getPluginType('InstantMessaging').getPluginList():
         instantMessagingAdmins.extend(imPlugin.getOption("admins").getValue())
     if not self._getUser() in instantMessagingAdmins:
         RHConferenceModifBase._checkProtection(self)
开发者ID:Ictp,项目名称:indico,代码行数:8,代码来源:rh.py

示例14: _checkProtection

# 需要导入模块: from MaKaC.webinterface.rh.conferenceModif import RHConferenceModifBase [as 别名]
# 或者: from MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase import _checkProtection [as 别名]
 def _checkProtection(self):
     if not RCPaperReviewManager.hasRights(self):
         RHConferenceModifBase._checkProtection(self)
开发者ID:ferhatelmas,项目名称:indico,代码行数:5,代码来源:reviewingAssignContributions.py

示例15: _checkProtection

# 需要导入模块: from MaKaC.webinterface.rh.conferenceModif import RHConferenceModifBase [as 别名]
# 或者: from MaKaC.webinterface.rh.conferenceModif.RHConferenceModifBase import _checkProtection [as 别名]
 def _checkProtection(self):
     RHConferenceModifBase._checkProtection(self)
     if self._conf.getType() != 'conference':
         raise NotFound('Only conferences have a menu')
开发者ID:MichelCordeiro,项目名称:indico,代码行数:6,代码来源:menu.py


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