Skip to content
代码片段 群组 项目
未验证 提交 a20e745e 编辑于 作者: Andrejs Cunskis's avatar Andrejs Cunskis 提交者: GitLab
浏览文件

Fall back to PAT UI fabrication when admin_api_client is missing

上级 f86b0540
No related branches found
No related tags found
无相关合并请求
...@@ -18,6 +18,8 @@ class PersonalAccessToken < Base ...@@ -18,6 +18,8 @@ class PersonalAccessToken < Base
end end
def fabricate_via_api! def fabricate_via_api!
raise Runtime::UserStore::InvalidTokenError, "Admin api client is missing" unless api_client
super super
self.api_client = Runtime::API::Client.new(personal_access_token: token) self.api_client = Runtime::API::Client.new(personal_access_token: token)
rescue Runtime::UserStore::InvalidTokenError, NoValueError rescue Runtime::UserStore::InvalidTokenError, NoValueError
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册