mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-22 14:54:38 +08:00
Merge pull request #2362 from biosistemika/SCI-4300-dropdowns-in-shared-inventories
SCI-4300 skip permission checks for list
This commit is contained in:
commit
7ec874596d
4 changed files with 3 additions and 16 deletions
|
@ -4,7 +4,7 @@ module RepositoryColumns
|
|||
class ChecklistColumnsController < BaseColumnsController
|
||||
before_action :load_column, only: %i(update destroy items)
|
||||
before_action :check_create_permissions, only: :create
|
||||
before_action :check_manage_permissions, only: %i(update destroy items)
|
||||
before_action :check_manage_permissions, only: %i(update destroy)
|
||||
helper_method :delimiters
|
||||
|
||||
def create
|
||||
|
|
|
@ -4,7 +4,7 @@ module RepositoryColumns
|
|||
class ListColumnsController < BaseColumnsController
|
||||
before_action :load_column, only: %i(update destroy items)
|
||||
before_action :check_create_permissions, only: :create
|
||||
before_action :check_manage_permissions, only: %i(update destroy items)
|
||||
before_action :check_manage_permissions, only: %i(update destroy)
|
||||
helper_method :delimiters
|
||||
|
||||
def create
|
||||
|
|
|
@ -5,7 +5,7 @@ module RepositoryColumns
|
|||
include InputSanitizeHelper
|
||||
before_action :load_column, only: %i(update destroy items)
|
||||
before_action :check_create_permissions, only: :create
|
||||
before_action :check_manage_permissions, only: %i(update destroy items)
|
||||
before_action :check_manage_permissions, only: %i(update destroy)
|
||||
|
||||
def create
|
||||
service = RepositoryColumns::CreateColumnService
|
||||
|
|
|
@ -262,18 +262,5 @@ RSpec.describe RepositoryColumns::StatusColumnsController, type: :controller do
|
|||
expect(response).to(have_http_status(404))
|
||||
end
|
||||
end
|
||||
|
||||
context 'when user does not have permissions' do
|
||||
before do
|
||||
user_team.role = :guest
|
||||
user_team.save
|
||||
end
|
||||
|
||||
it 'respons with status 403' do
|
||||
action
|
||||
|
||||
expect(response).to(have_http_status(403))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue