mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-27 10:08:11 +08:00
Fix experiment archive permissions
This commit is contained in:
parent
deecbf082c
commit
775a39344c
1 changed files with 8 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue