ability.rb revision c1c9b51cf3a275c9631b6de90e71b833bf97ded9
# Define abilities for the passed in user here.
if user.admin?
can { true }
elsif user.id
# Ontologies
end
can [:destroy, :permissions], Ontology do |subject|
end
# Team permissions
end
# Comments
subject.user == user || subject.commentable.permission?(:owner, user)
end
# TODO can for Metadata!
end
# See the wiki for details: https://github.com/ryanb/cancan/wiki/Defining-Abilities
end
end