add: operate permission and request timeout

This commit is contained in:
yystopf 2022-05-12 11:12:34 +08:00
parent 3eccd6be64
commit 5d771c824b
2 changed files with 3 additions and 0 deletions

View File

@ -1,7 +1,9 @@
class Traces::ProjectsController < Traces::BaseController
include OperateProjectAbilityAble
before_action :require_login
before_action :load_project
before_action :authorizate_user_can_edit_project!
def tasks
branch_name = params[:branch_name]

View File

@ -18,6 +18,7 @@ class Trace::ClientService < ApplicationService
url = URI("#{full_url(url)}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request.read_timeout = 1200
request["Authorization"] = token
form_data = params[:data].stringify_keys.to_a
request.set_form form_data, 'multipart/form-data'