Пример #1
0
 def _checkParams(self, params):
     RHConferenceModifBase._checkParams(self, params)
     from MaKaC.webinterface.rh.reviewingModif import RCPaperReviewManager, RCReferee
     self._isPRM = RCPaperReviewManager.hasRights(self)
     self._isReferee = RCReferee.hasRights(self)
     self._requests_manager = is_request_manager(session.user)
     self._plugin_urls = values_from_signal(signals.event_management.management_url.send(self.event_new),
                                            single_value=True)
Пример #2
0
 def _checkParams(self, params):
     RHConferenceModifBase._checkParams(self, params)
     from MaKaC.webinterface.rh.reviewingModif import RCPaperReviewManager, RCReferee
     self._isPRM = RCPaperReviewManager.hasRights(self)
     self._isReferee = RCReferee.hasRights(self)
     self._requests_manager = is_request_manager(session.user)
     self._plugin_urls = values_from_signal(
         signals.event_management.management_url.send(self.event_new),
         single_value=True)
Пример #3
0
def _extend_event_management_menu(sender, event, **kwargs):
    if not get_request_definitions():
        return
    if not event.can_manage(session.user) and not is_request_manager(
            session.user):
        return
    return SideMenuItem('requests',
                        _('Logistics'),
                        url_for('requests.event_requests', event),
                        section='services')
Пример #4
0
 def _check_access(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.can_manage(session.user)
     self.protection_overridden = can_manage_request and not can_manage_event
     if not can_manage_request and not can_manage_event:
         RHManageEventBase._check_access(self)
Пример #5
0
 def _check_access(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.can_manage(session.user)
     self.protection_overridden = can_manage_request and not can_manage_event
     if not can_manage_request and not can_manage_event:
         RHManageEventBase._check_access(self)
Пример #6
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)
Пример #7
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)
Пример #8
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)
Пример #9
0
def _extend_event_management_menu(event, **kwargs):
    visible = bool(get_request_definitions()) and (event.canModify(session.user) or is_request_manager(session.user))
    return 'requests', SideMenuItem('Services', url_for('requests.event_requests', event), visible=visible)
Пример #10
0
def _get_event_management_url(event, **kwargs):
    if is_request_manager(session.user):
        return url_for('requests.event_requests', event)
Пример #11
0
def _get_event_management_url(event, **kwargs):
    if is_request_manager(session.user):
        return url_for('requests.event_requests', event)
Пример #12
0
def _extend_event_management_menu(sender, event, **kwargs):
    if not get_request_definitions():
        return
    if not event.can_manage(session.user) and not is_request_manager(session.user):
        return
    return SideMenuItem('requests', _('Logistics'), url_for('requests.event_requests', event), section='services')