Merge pull request #7479 from heyitsanthony/auth-admin-nilcheck

auth: nil check AuthInfo when checking admin permissions
This commit is contained in:
Xiang Li 2017-03-11 23:30:33 -08:00 committed by GitHub
commit 76aa7f6935

View File

@ -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()