Fix experiment archive permissions

This commit is contained in:
Jure Grabnar 2016-08-08 13:40:08 +02:00
parent deecbf082c
commit 775a39344c

View file

@ -274,11 +274,17 @@ module PermissionHelper
end
def can_archive_project(project)
is_owner_of_project(project)
is_owner_of_project(project) ||
is_user_of_project(project) ||
is_admin_of_organization(project.organization)
end
def can_restore_project(project)
project.archived? and is_owner_of_project(project)
project.archived? && (
is_owner_of_project(project) ||
is_user_of_project(project) ||
is_admin_of_organization(project.organization)
)
end
def can_add_user_to_project(project)