Skip to content
Snippets Groups Projects
Commit a75783d0 authored by Israel Barreto Sant'Anna's avatar Israel Barreto Sant'Anna
Browse files

Fixed learning object update policy

parent 021ad629
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ class LearningObjectPolicy < ApplicationPolicy
end
def update?
record if ( user_can_update? && record.state == 'draft' ) || ( user.is_publisher? && user_can_update? ) || (!user.nil? && user.is_admin?)
record if (user_can_update? && record.state == 'draft') || (owns? && user.is_publisher?) || (owns? && user.is_partner?) || (!user.nil? && user.is_admin?)
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