Merge pull request #2362 from biosistemika/SCI-4300-dropdowns-in-shared-inventories

SCI-4300 skip permission checks for list
This commit is contained in:
Miha Mencin 2020-01-27 15:25:32 +01:00 committed by GitHub
commit 7ec874596d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 16 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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