diff --git a/app/helpers/permission_helper.rb b/app/helpers/permission_helper.rb index 808cbad42..78eb7fe3c 100644 --- a/app/helpers/permission_helper.rb +++ b/app/helpers/permission_helper.rb @@ -328,6 +328,13 @@ module PermissionHelper # ---- EXPERIMENT PERMISSIONS ---- + def can_view_experiment_actions(experiment) + can_edit_experiment(experiment) && + can_clone_experiment(experiment) && + can_move_experiment(experiment) && + can_archive_experiment(experiment) + end + def can_create_experiment(project) is_user_or_higher_of_project(project) end diff --git a/app/views/projects/show/_experiment.html.erb b/app/views/projects/show/_experiment.html.erb index e4f405b08..bed8737b4 100644 --- a/app/views/projects/show/_experiment.html.erb +++ b/app/views/projects/show/_experiment.html.erb @@ -2,7 +2,7 @@
- <% if is_user_or_higher_of_project @project %> + <% if can_view_experiment_actions experiment %>