mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #15801 from ioito/automated-cherry-pick-of-#15800-upstream-release-3.10
Automated cherry pick of #15800: fix(mcclient): 避免休眠后再次启动后admin token失效, 导致用户登录失败
This commit is contained in:
@@ -331,6 +331,9 @@ func Client() *mcclient.Client {
|
||||
}
|
||||
|
||||
func AdminCredential() mcclient.TokenCredential {
|
||||
if manager.adminCredential.GetExpires().Before(time.Now()) {
|
||||
manager.reAuth()
|
||||
}
|
||||
return manager.adminCredential
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user