mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-06 12:43:06 +08:00
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:
commit
888cb60067
2 changed files with 4 additions and 4 deletions
|
@ -9,9 +9,9 @@ class StorageLocationsController < ApplicationController
|
||||||
before_action :switch_team_with_param, only: %i(index show)
|
before_action :switch_team_with_param, only: %i(index show)
|
||||||
before_action :check_storage_locations_enabled, except: :unassign_rows
|
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 :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_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)
|
before_action :set_breadcrumbs_items, only: %i(index show)
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -27,7 +27,7 @@ module Toolbars
|
||||||
private
|
private
|
||||||
|
|
||||||
def unassign_action
|
def unassign_action
|
||||||
return unless can_manage_storage_location?(@storage_location)
|
return unless can_read_storage_location?(@storage_location)
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'unassign',
|
name: 'unassign',
|
||||||
|
@ -39,7 +39,7 @@ module Toolbars
|
||||||
end
|
end
|
||||||
|
|
||||||
def move_action
|
def move_action
|
||||||
return unless @single && can_manage_storage_location?(@storage_location)
|
return unless @single && can_read_storage_location?(@storage_location)
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'move',
|
name: 'move',
|
||||||
|
|
Loading…
Reference in a new issue