예제 #1
0
    def _process_args(self, editor):
        RHEditablesBase._process_args(self)
        if (not self.event.can_manage(editor, self.editable_type.editor_permission)
                and not self.event.can_manage(editor, 'editing_manager')):
            raise Forbidden(_('This user is not an editor of the {} type').format(self.editable_type.name))

        self.editor = editor
예제 #2
0
 def _check_access(self):
     RHEditablesBase._check_access(self)
     if (not self.event.can_manage(session.user,
                                   self.editable_type.editor_permission) and
             not self.event.can_manage(session.user, 'editing_manager')):
         raise Forbidden(
             _('You are not an editor of the {} type').format(
                 self.editable_type.name))