Merge pull request #7932 from aignatov-bio/ai-sci-11118-fix-permission-for-shared-locations

Fix permission for shared storage locations [SCI-11118]
This commit is contained in:
Martin Artnik 2024-10-07 16:16:05 +02:00 committed by GitHub
commit 888cb60067
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -9,9 +9,9 @@ class StorageLocationsController < ApplicationController
before_action :switch_team_with_param, only: %i(index show)
before_action :check_storage_locations_enabled, except: :unassign_rows
before_action :load_storage_location, only: %i(update destroy duplicate move show available_positions unassign_rows export_container import_container)
before_action :check_read_permissions, except: %i(index create tree actions_toolbar)
before_action :check_read_permissions, except: %i(index create tree actions_toolbar import_container unassign_rows)
before_action :check_create_permissions, only: :create
before_action :check_manage_permissions, only: %i(update destroy duplicate move unassign_rows import_container)
before_action :check_manage_permissions, only: %i(update destroy duplicate move)
before_action :set_breadcrumbs_items, only: %i(index show)
def index

View file

@ -27,7 +27,7 @@ module Toolbars
private
def unassign_action
return unless can_manage_storage_location?(@storage_location)
return unless can_read_storage_location?(@storage_location)
{
name: 'unassign',
@ -39,7 +39,7 @@ module Toolbars
end
def move_action
return unless @single && can_manage_storage_location?(@storage_location)
return unless @single && can_read_storage_location?(@storage_location)
{
name: 'move',