FIX devops pwd auth bug
This commit is contained in:
parent
28d6aa2dda
commit
64a3ab24e2
|
@ -2640,7 +2640,7 @@ GET /api/users/ci/oauth_grant
|
|||
*示例*
|
||||
```
|
||||
curl -X GET \
|
||||
-d "password=123456"
|
||||
-d "password=123456" \
|
||||
http://localhost:3000/api/users/ci/oauth_grant.json | jq
|
||||
```
|
||||
*请求参数说明:*
|
||||
|
|
|
@ -84,7 +84,8 @@ class Ci::CloudAccountsController < Ci::BaseController
|
|||
end
|
||||
|
||||
def oauth_grant
|
||||
return render_error('你输入的密码不正确.') unless current_user.check_password?(params[:password].to_s)
|
||||
password = params[:password].to_s
|
||||
return render_error('你输入的密码不正确.') unless current_user.check_password?(password)
|
||||
|
||||
result = gitea_oauth_grant!(current_user.login, password, @cloud_account.drone_url, current_user.oauths.last&.client_id)
|
||||
result === true ? render_ok : render_error('授权失败.')
|
||||
|
|
Loading…
Reference in New Issue