removes unneeded permissions

This commit is contained in:
Zmago Devetak 2018-01-24 16:34:48 +01:00 committed by GitHub
parent 76b08e6ac9
commit 4b2098c0c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -118,18 +118,3 @@ Canaid::Permissions.register_for(RepositoryColumn) do
end
end
Canaid::Permissions.register_for(Project) do
# view project
can :read_project do |user, project|
user.is_admin_of_team?(project.team) ||
user.is_member_of_project?(project) ||
(project.visible? && user.is_member_of_team?(project.team))
end
end
Canaid::Permissions.register_for(Experiment) do
# view experiment
can :read_experiment do |user, experiment|
user.is_member_of_team?(experiment.project.team)
end
end