Skip to content
Snippets Groups Projects
Commit e2ca7b86 authored by Marcela Ribeiro de Oliveira's avatar Marcela Ribeiro de Oliveira
Browse files

Merge branch 'master' of gitlab.c3sl.ufpr.br:portalmec/portalmec into stable

parents f17a0f33 dc33ade2
No related branches found
No related tags found
No related merge requests found
......@@ -78,6 +78,10 @@ class ApplicationPolicy
user.is_admin? || user.is_editor?
end
def user_can_update?
(owns? && user.is_submitter?) || (owns? && user.is_partner?) || user.is_admin?
end
def user_can_curate?
user.is_curator?
end
......
......@@ -42,7 +42,7 @@ class LearningObjectPolicy < ApplicationPolicy
end
def update?
record if (owns? && user.is_submitter?) || (owns? && user.is_partner?)
record if user_can_update?
end
def publish?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment