Example #1
0
 def _check_access(self):
     RHContributionEditableBase._check_access(self)
     if self.event.can_manage(session.user, permission='paper_editing'):
         return
     if not self._user_is_authorized_submitter(
     ) and not self._user_is_authorized_editor():
         raise Forbidden
Example #2
0
 def _check_access(self):
     RHContributionEditableBase._check_access(self)
     if not self.contrib.can_submit_proceedings(session.user):
         raise Forbidden
     # TODO: check if submitting papers for editing is allowed in the event
     if self.editable_type.name not in self.contrib.allowed_types_for_editable:
         raise Forbidden
Example #3
0
 def _check_access(self):
     RHContributionEditableBase._check_access(self)
     if not self._user_is_authorized_submitter():
         # XXX: should event managers be able to submit on behalf of the user?
         raise Forbidden
     # TODO: check if submitting papers for editing is allowed in the event
     if self.editable_type.name not in self.contrib.allowed_types_for_editable:
         raise Forbidden
Example #4
0
 def _process_args(self):
     RHContributionEditableBase._process_args(self)
     if not self.editable:
         raise NotFound
     self.revision = (EditingRevision.query.with_parent(
         self.editable, 'revisions').filter_by(
             id=request.view_args['revision_id']).first_or_404())
     if self.revision is None:
         raise NotFound
Example #5
0
 def _process_args(self):
     RHContributionEditableBase._process_args(self)
     if not self.editable:
         raise NotFound
Example #6
0
 def _check_access(self):
     RHContributionEditableBase._check_access(self)
     if not self.editable.can_see_timeline(session.user):
         raise Forbidden
Example #7
0
 def _check_access(self):
     RHContributionEditableBase._check_access(self)
     if not self._check_revision_access():
         raise UserValueError(
             _('You cannot perform this action on this revision'))
Example #8
0
 def _check_access(self):
     RHContributionEditableBase._check_access(self)
     if not self._user_is_authorized_submitter():
         # XXX: should event managers be able to submit on behalf of the user?
         raise Forbidden
Example #9
0
 def _check_access(self):
     RHContributionEditableBase._check_access(self)
     if not self.editable.can_assign_self(session.user):
         raise Forbidden(
             _('You do not have the permission to assign yourself'))
Example #10
0
 def _check_access(self):
     RHContributionEditableBase._check_access(self)
     if not self.editable.can_unassign(session.user):
         raise Forbidden(
             _('You do not have the permission to unassign this user'))