Skip to content
Snippets Groups Projects
Commit 574f4b93 authored by Clarissa's avatar Clarissa
Browse files

#204: Error with learning_objects check

parent 24b0ca02
No related branches found
No related tags found
No related merge requests found
......@@ -38,9 +38,10 @@ class LearningObjectPolicy < ApplicationPolicy
end
def show?
return record if record.published? || user_can_moderate?
return record if record.published? || ( !user.nil? && user_can_moderate? )
return record if user == record.publisher
## TODO: falta verificar se o +record.publisher+ é uma instituição e +user+ faz parte
# => return owner.users.include?(user) if owner.is_a?(Institution) (???)
end
def index?
......
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