mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #7479 from heyitsanthony/auth-admin-nilcheck
auth: nil check AuthInfo when checking admin permissions
This commit is contained in:
commit
76aa7f6935
@ -744,6 +744,9 @@ func (as *authStore) IsAdminPermitted(authInfo *AuthInfo) error {
|
||||
if !as.isAuthEnabled() {
|
||||
return nil
|
||||
}
|
||||
if authInfo == nil {
|
||||
return ErrUserEmpty
|
||||
}
|
||||
|
||||
tx := as.be.BatchTx()
|
||||
tx.Lock()
|
||||
|
Loading…
x
Reference in New Issue
Block a user