this should fix travis ci

This commit is contained in:
Zanz2 2018-09-24 13:33:44 +02:00
parent 1e8442e22e
commit e5b7d68031

View file

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