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

only submitter can create or update learning_objects

parent 8a4a449e
No related branches found
No related tags found
No related merge requests found
...@@ -19,11 +19,11 @@ class LearningObjectPolicy < ApplicationPolicy ...@@ -19,11 +19,11 @@ class LearningObjectPolicy < ApplicationPolicy
end end
def create? def create?
record if user_exists? record if user_exists? && user.is_submitter?
end end
def update? def update?
record if owns? record if owns? && user.is_submitter?
end end
def publish? 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