mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-03 19:24:48 +08:00
this should fix travis ci
This commit is contained in:
parent
1e8442e22e
commit
e5b7d68031
1 changed files with 8 additions and 2 deletions
|
@ -6,8 +6,8 @@ module Api
|
|||
before_action :load_team
|
||||
before_action :load_inventory
|
||||
before_action :load_inventory_column, only: %i(show update destroy)
|
||||
before_action :check_manage_permissions, only: %i(create update destroy)
|
||||
|
||||
before_action :check_manage_permissions, only: %i(update destroy)
|
||||
before_action :check_create_permissions, only: %i(create)
|
||||
def index
|
||||
columns = @inventory.repository_columns
|
||||
.includes(:repository_list_items)
|
||||
|
@ -66,6 +66,12 @@ module Api
|
|||
end
|
||||
end
|
||||
|
||||
def check_create_permissions
|
||||
unless can_manage_repository?(@inventory)
|
||||
render body: nil, status: :forbidden
|
||||
end
|
||||
end
|
||||
|
||||
def inventory_column_params
|
||||
unless params.require(:data).require(:type) == 'inventory_columns'
|
||||
raise ActionController::BadRequest,
|
||||
|
|
Loading…
Reference in a new issue