Forgot to add check whether project is active for archive project permission. Added some additional comments for checking if project is active in permissions.

This commit is contained in:
Matej Zrimšek 2018-02-13 17:10:59 +01:00
parent c09ffa4043
commit 70fdae567c

View file

@ -45,8 +45,10 @@ Canaid::Permissions.register_for(Project) do
user.is_technician_or_higher_of_project?(project)
end
# Project must be active for all the specified permissions
%i(read_project
manage_project
archive_project
create_experiment
create_comment_in_project
create_or_manage_tags
@ -65,6 +67,7 @@ Canaid::Permissions.register_for(Comment) do
user.is_owner_of_project?(project))
end
# Project must be active for all the specified permissions
%i(manage_comment_in_project)
.each do |perm|
can perm do |_, comment|