예제 #1
0
파일: protection.py 프로젝트: jacg/indico
 def _process_args(self):
     RHManageEventBase._process_args(self)
     args = parser.parse({
         'values': PrincipalDict(allow_groups=True, allow_external_users=True, allow_event_roles=True,
                                 allow_category_roles=True, event_id=self.event.id, missing={})
     })
     self.values = args['values']
예제 #2
0
 def _checkParams(self, params):
     RHManageEventBase._checkParams(self, params)
     self.target_category = Category.get_one(int(
         request.form['target_category_id']),
                                             is_deleted=False)
     if not self.target_category.can_create_events(session.user):
         raise Forbidden(
             _("You may only move events to categories where you are allowed to create events."
               ))
예제 #3
0
 def _process_args(self):
     RHManageEventBase._process_args(self)
     self.target_category = Category.get_or_404(int(
         request.form['target_category_id']),
                                                is_deleted=False)
     if not self.target_category.can_create_events(session.user):
         raise Forbidden(
             _('You may only move events to categories where you are allowed to create events.'
               ))
예제 #4
0
    def _check_access(self):
        if not session.user:
            raise Forbidden
        # If the user cannot manage the whole event see if anything gives them
        # limited management access.
        if not self.event.can_manage(session.user):
            urls = sorted(values_from_signal(signals.event_management.management_url.send(self.event),
                                             single_value=True))
            response = redirect(urls[0]) if urls else None
            raise Forbidden(response=response)

        RHManageEventBase._check_access(self)  # mainly to trigger the legacy "event locked" check
예제 #5
0
    def _check_access(self):
        if not session.user:
            raise Forbidden
        # If the user cannot manage the whole event see if anything gives them
        # limited management access.
        if not self.event.can_manage(session.user):
            urls = sorted(values_from_signal(signals.event_management.management_url.send(self.event),
                                             single_value=True))
            response = redirect(urls[0]) if urls else None
            raise Forbidden(response=response)

        RHManageEventBase._check_access(self)  # mainly to trigger the legacy "event locked" check
예제 #6
0
파일: actions.py 프로젝트: javfg/indico
 def _process_args(self, target_category, comment):
     RHManageEventBase._process_args(self)
     self.target_category = target_category
     self.comment = comment
예제 #7
0
 def _process_args(self):
     RHManageEventBase._process_args(self)
     self.obj = get_object_from_args()[2]
     if self.obj is None:
         raise NotFound
예제 #8
0
파일: actions.py 프로젝트: indico/indico
 def _process_args(self):
     RHManageEventBase._process_args(self)
     self.target_category = Category.get_one(int(request.form['target_category_id']), is_deleted=False)
     if not self.target_category.can_create_events(session.user):
         raise Forbidden(_("You may only move events to categories where you are allowed to create events."))
예제 #9
0
 def _checkProtection(self):
     self.ALLOW_LOCKED = self.event_new.can_lock(session.user)
     RHManageEventBase._checkProtection(self)
예제 #10
0
 def _checkProtection(self):
     RHManageEventBase._checkProtection(self)
     if not self.event_new.can_lock(session.user):
         raise Forbidden
예제 #11
0
 def _process_args(self):
     RHManageEventBase._process_args(self)
     self.editable_type = EditableType[request.view_args['type']]
예제 #12
0
파일: actions.py 프로젝트: indico/indico
 def _check_access(self):
     self.ALLOW_LOCKED = self.event.can_lock(session.user)
     RHManageEventBase._check_access(self)
예제 #13
0
파일: actions.py 프로젝트: imfht/flaskapps
 def _check_access(self):
     RHManageEventBase._check_access(self)
     if not self.event.can_lock(session.user):
         raise Forbidden
예제 #14
0
파일: actions.py 프로젝트: javfg/indico
 def _process_args(self):
     RHManageEventBase._process_args(self)
     self.request = self.event.pending_move_request
     if not self.request:
         raise NotFound
예제 #15
0
파일: actions.py 프로젝트: javfg/indico
 def _check_access(self):
     RHManageEventBase._check_access(self)
     if (not self.target_category.can_create_events(session.user)
             and not self.target_category.can_propose_events(session.user)):
         raise Forbidden(_('You may not move events to this category.'))
예제 #16
0
 def _process_args(self):
     RHManageEventBase._process_args(self)
     self.obj = get_object_from_args()[2]
     if self.obj is None:
         raise NotFound
예제 #17
0
 def _checkParams(self, params):
     RHManageEventBase._checkParams(self, params)
     self.obj = get_object_from_args()[2]
     if self.obj is None:
         raise NotFound
예제 #18
0
파일: actions.py 프로젝트: imfht/flaskapps
 def _check_access(self):
     self.ALLOW_LOCKED = self.event.can_lock(session.user)
     RHManageEventBase._check_access(self)
예제 #19
0
파일: actions.py 프로젝트: indico/indico
 def _check_access(self):
     RHManageEventBase._check_access(self)
     if not self.event.can_lock(session.user):
         raise Forbidden