• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python conferenceModif.RHConferenceModifBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _checkParams

 def _checkParams(self, params):
     RHConferenceModifBase._checkParams(self, params)
     self._isPRM = RCPaperReviewManager.hasRights(self)
     self._isReferee = RCReferee.hasRights(self)
     self._isReviewingStaff = RCReviewingStaff.hasRights(self)
     self._isEditor = RCEditor.hasRights(self)
     self._isReviewer = RCReviewer.hasRights(self)
开发者ID:VishrutMehta,项目名称:indico,代码行数:7,代码来源:reviewingModif.py


示例2: _checkParams

 def _checkParams(self, params):
     RHConferenceModifBase._checkParams(self, params)
     self.session = None
     if 'session_id' in request.view_args:
         self.session = self.event_new.get_session(request.view_args['session_id'])
         if self.session is None:
             raise NotFound
开发者ID:OmeGak,项目名称:indico,代码行数:7,代码来源:__init__.py


示例3: _checkParams

 def _checkParams(self, params):
     RHConferenceModifBase._checkParams(self, params)
     try:
         self.event_id = int(self._conf.id)
     except ValueError:
         raise IndicoError(_('This page is not available for legacy events.'))
     self.event = self._conf
开发者ID:marcosmolla,项目名称:indico,代码行数:7,代码来源:controllers.py


示例4: _checkParams

    def _checkParams(self, params):
        RHConferenceModifBase._checkParams(self, params)
        
        self._activeTabName = params.get("tab", None)
        
        self._canSeeAllPluginTabs = self._target.canModify(self.getAW()) or RCCollaborationAdmin.hasRights(self) or RCVideoServicesManager.hasRights(self)
        
        # we build the list 'allowedTabs', a list of all tabs that the user can see
        if self._canSeeAllPluginTabs:
            #if the logged in user is event manager, server admin or collaboration admin: we show all plugin tabs
            allowedTabs = CollaborationTools.getTabs(self._conf)
        else:
            #else we show only the tabs of plugins of which the user is admin
            allowedTabs = CollaborationTools.getTabs(self._conf, self._getUser())
            
        if self._target.canModify(self.getAW()) or RCVideoServicesManager.hasRights(self):
            allowedTabs.append('Managers')
            
        # we order the list of allowedTabs into the self._tabs list
        tabOrder = CollaborationTools.getCollaborationOptionValue('tabOrder')
        self._tabs = []
        
        for tabName in tabOrder:
            if tabName in allowedTabs:
                self._tabs.append(tabName)
                allowedTabs.remove(tabName)
                
        for tabName in allowedTabs:
            if tabName != 'Managers':
                self._tabs.append(tabName)

        if 'Managers' in allowedTabs:
            self._tabs.append('Managers')
开发者ID:lukasnellen,项目名称:indico,代码行数:33,代码来源:collaboration.py


示例5: _checkParams

 def _checkParams(self, params):
     RHConferenceModifBase._checkParams(self, params)
     self.event = self._conf
     try:
         self.event_id = int(self.event.getId())
     except ValueError:
         raise NoReportError(_('Room booking tools are not available for legacy events.'))
开发者ID:pferreir,项目名称:indico-backup,代码行数:7,代码来源:event.py


示例6: _checkProtection

    def _checkProtection(self):
        if not PluginsHolder().hasPluginType("statistics"):
            raise PluginError(_("Statistics plugin is not active."))

        self._checkSessionUser()

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


示例7: _checkParams

    def _checkParams(self, params):
        RHConferenceModifBase._checkParams(self, params)

        self._activeTabName = params.get("tab", None)

        # we build the list 'allowedTabs', a list of all tabs that the user can see
        allowedTabs = CollaborationTools.getTabs(self._conf, self._getUser())

        if self._target.canModify(self.getAW()) or RCVideoServicesManager.hasRights(self):
            allowedTabs.append('Managers')

        tabOrder = CollaborationTools.getCollaborationOptionValue('tabOrder')
        self._tabs = []

        for tabName in tabOrder:
            if tabName in allowedTabs:
                self._tabs.append(tabName)
                allowedTabs.remove(tabName)

        for tabName in allowedTabs:
            if tabName != 'Managers':
                self._tabs.append(tabName)

        if 'Managers' in allowedTabs:
            self._tabs.append('Managers')
开发者ID:bubbas,项目名称:indico,代码行数:25,代码来源:collaboration.py


示例8: _checkProtection

 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,代码行数:8,代码来源:controllers.py


示例9: _checkProtection

 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,代码行数:8,代码来源:reviewingListContribToJudge.py


示例10: _checkParams

 def _checkParams(self, params):
     RHConferenceModifBase._checkParams(self, params)
     if 'fileId' not in params:
         raise NotFoundError(_("Missing 'fileId' argument."))
     self._offlineEvent = ModuleHolder().getById("offlineEvents").getOfflineEventByFileId(params["confId"],
                                                                                          params["fileId"])
     if not self._offlineEvent or not self._offlineEvent.file or \
        not os.path.isfile(self._offlineEvent.file.getFilePath()):
         raise NotFoundError(_("The file you try to access does not exist anymore."))
开发者ID:ferhatelmas,项目名称:indico,代码行数:9,代码来源:fileAccess.py


示例11: _checkParams

 def _checkParams(self, params):
     RHConferenceModifBase._checkParams(self, params)
     try:
         self.definition = get_request_definitions()[request.view_args['type']]
     except KeyError:
         raise NotFound
     self.request = Request.find_latest_for_event(self.event_new, self.definition.name)
     if self._require_request and not self.request:
         raise NotFound
开发者ID:fph,项目名称:indico,代码行数:9,代码来源:controllers.py


示例12: _checkParams

    def _checkParams(self, params):
        RHConferenceModifBase._checkParams(self, params)

        self._activeTabName = params.get("tab", None)

        self._tabs = []
        #fill the tabs with the active plugins in the Instant Messaging module
        for plugin in PluginsHolder().getPluginType('InstantMessaging').getPluginList():
            if plugin.isActive():
                self._tabs.append(plugin.getName())
开发者ID:Ictp,项目名称:indico,代码行数:10,代码来源:rh.py


示例13: _checkProtection

    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,代码行数:10,代码来源:handlers.py


示例14: _checkProtection

 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,代码行数:10,代码来源:collaboration.py


示例15: _checkParams

 def _checkParams(self, params):
     RHConferenceModifBase._checkParams(self, params)
     self._params = params
     self._params["loading_gif"] = "{}/images/loading.gif".format(Config.getInstance().getBaseURL())
     self._params["report"] = ReportGeneral.get(
         event_id=params.get("confId"),
         contrib_id=params.get("contrib_id"),
         start_date=params.get("start_date"),
         end_date=params.get("end_date"),
     )
开发者ID:florv,项目名称:indico-plugins,代码行数:10,代码来源:controllers.py


示例16: _checkProtection

 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,代码行数:12,代码来源:controllers.py


示例17: _checkParams

    def _checkParams(self, params):
        RHConferenceModifBase._checkParams(self, params)
        self.spkUniqueId = params.get('spkUniqueId', None)
        self.file = params.get('file', None)
        self.filePath = ''

        if self.file and self.spkUniqueId:
            try:
                self.filePath = self.saveFileToTemp(self.file.file)
                self._tempFilesToDelete.append(self.filePath)
            except AttributeError:
                raise MaKaCError("Problem when storing file")
开发者ID:ferhatelmas,项目名称:indico,代码行数:12,代码来源:handlers.py


示例18: _checkProtection

 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,代码行数:16,代码来源:__init__.py


示例19: _checkProtection

 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,代码行数:5,代码来源:reviewingControlModif.py


示例20: _checkProtection

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python contribMod.RHContribModifBase类代码示例发布时间:2022-05-24
下一篇:
Python conferenceDisplay.RHConferenceBaseDisplay类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap