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

Merge branch 'update-roles' into 'master'

change update learning_object policy

See merge request !455
parents c397acee 4758d2fb
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