RBAC: Check forceLogin inside CanAdminPlugins (#93449)

This commit is contained in:
Syerikjan Kh
2024-09-20 09:35:58 -04:00
committed by GitHub
parent f9ad81f715
commit 715ee35abc
2 changed files with 91 additions and 0 deletions

View File

@ -98,6 +98,10 @@ func CanAdminPlugins(cfg *setting.Cfg, accessControl ac.AccessControl) func(c *c
accessForbidden(c)
return
}
if c.AllowAnonymous && !c.IsSignedIn && shouldForceLogin(c) {
notAuthorized(c)
return
}
}
}