Beispiel #1
0
 def _checkProtection(self):
     if self._target.hasEnabledSection("paperReviewing"):
         if not RCPaperReviewManager.hasRights(self):
             RHConferenceModifBase._checkProtection(self)
     else:
         raise MaKaCError(
             _("Paper Reviewing is not active for this conference"))
Beispiel #2
0
    def _checkProtection(self):
        if not PluginsHolder().hasPluginType("statistics"):
            raise PluginError(_("Statistics plugin is not active."))

        self._checkSessionUser()

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

        self._checkSessionUser()

        RHConferenceModifBase._checkProtection(self)
Beispiel #4
0
 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)
 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"))
Beispiel #6
0
 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
Beispiel #7
0
 def _checkProtection(self):
     self.protection_overridden = False
     can_modify_plugin = session.avatar and self.plugin.can_be_modified(
         session.avatar, 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
Beispiel #8
0
    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)
Beispiel #9
0
 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"))
Beispiel #10
0
    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)
Beispiel #11
0
    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)
Beispiel #12
0
 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)
Beispiel #13
0
 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)
Beispiel #14
0
 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 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.event_new.can_manage(session.user, allow_key=True)
     self.protection_overridden = can_manage_request and not can_manage_event
     if not can_manage_request and not can_manage_event:
         RHConferenceModifBase._checkProtection(self)
Beispiel #15
0
 def _checkProtection(self):
     self.protection_overridden = False
     if hasattr(self, 'definition'):
         # check if user can manage *that* request
         can_manage_request = session.avatar and self.definition.can_be_managed(
             session.avatar)
     else:
         # check if user can manage any request
         can_manage_request = session.avatar and is_request_manager(
             session.avatar)
     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)
Beispiel #16
0
 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
Beispiel #17
0
 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
Beispiel #18
0
 def _checkProtection(self):
     if not self._isReviewingStaff:
         RHConferenceModifBase._checkProtection(self)
Beispiel #19
0
 def _checkProtection(self):
     if not PluginsHolder().hasPluginType("Collaboration"):
         raise PluginError("Collaboration plugin system is not active")
     if not RCVideoServicesManager.hasRights(self):
         RHConferenceModifBase._checkProtection(self)
Beispiel #20
0
 def _checkProtection(self):
     RHConferenceModifBase._checkProtection(self)
     if not can_lock(self._conf, session.user):
         raise Forbidden
Beispiel #21
0
 def _checkProtection(self):
     RHConferenceModifBase._checkProtection(self)
     if not can_lock(self.event_new, session.user):
         raise Forbidden
Beispiel #22
0
 def _checkProtection(self):
     if self._target.hasEnabledSection("paperReviewing"):
         RHConferenceModifBase._checkProtection(self)
     else:
         raise MaKaCError(_("Paper Reviewing is not active for this conference"))
Beispiel #23
0
 def _checkProtection(self):
     if not self._isReviewingStaff:
         RHConferenceModifBase._checkProtection(self)
Beispiel #24
0
 def _checkProtection(self):
     if not RCPaperReviewManager.hasRights(self):
         RHConferenceModifBase._checkProtection(self)
Beispiel #25
0
 def _checkProtection(self):
     RHConferenceModifBase._checkProtection(self)
     if self.event_new.type_ != EventType.conference:
         raise NotFound('Only conferences have a menu')
Beispiel #26
0
 def _checkProtection(self):
     RHConferenceModifBase._checkProtection(self)
     if self.event_new.type_ != EventType.conference:
         raise NotFound('Only conferences have a menu')
Beispiel #27
0
 def _checkProtection(self):
     RHConferenceModifBase._checkProtection(self)
     RHRoomBookingBase._checkProtection(self)
Beispiel #28
0
    def _checkProtection(self):

        if not RCVideoServicesManager.hasRights(self._getUser(), self._conf):
            RHConferenceModifBase._checkProtection(self)
Beispiel #29
0
 def _checkProtection(self):
     self._allowClosed = can_lock(self.event_new, session.user)
     RHConferenceModifBase._checkProtection(self)
Beispiel #30
0
Datei: rh.py Projekt: Ictp/indico
 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)
 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"))
Beispiel #32
0
 def _checkProtection(self):
     RHConferenceModifBase._checkProtection(self)
     if self._conf.getType() != 'conference':
         raise NotFound('Only conferences have a menu')
Beispiel #33
0
 def _checkProtection(self):
     self._allowClosed = can_lock(self._conf, session.user)
     RHConferenceModifBase._checkProtection(self)
Beispiel #34
0
 def _checkProtection(self):
     RHConferenceModifBase._checkProtection(self)
     RHRoomBookingBase._checkProtection(self)
 def _checkProtection(self):
     if not RCPaperReviewManager.hasRights(self):
         RHConferenceModifBase._checkProtection(self)
Beispiel #36
0
    def _checkProtection(self):

        if not RCVideoServicesManager.hasRights(self._getUser(), self._conf):
            RHConferenceModifBase._checkProtection(self)
Beispiel #37
0
 def _checkProtection(self):
     if not PluginsHolder().hasPluginType("Collaboration"):
         raise PluginError("Collaboration plugin system is not active")
     if not RCVideoServicesManager.hasRights(self):
         RHConferenceModifBase._checkProtection(self)
Beispiel #38
0
 def _checkProtection(self):
     if not is_chat_admin(session.user):
         RHConferenceModifBase._checkProtection(self)