Profile: Fixes profile preferences being accessible when anonymous access was enabled (#31516)

* Profile: Fixes profile preferences page being available when anonymous access was enabled

* Minor change

* Renamed property
This commit is contained in:
Torkel Ödegaard
2021-02-27 18:04:28 +01:00
committed by GitHub
parent e9d2592481
commit 7428668835
5 changed files with 27 additions and 12 deletions

View File

@ -15,9 +15,10 @@ var (
ReqSignedIn: true,
ReqGrafanaAdmin: true,
})
ReqSignedIn = Auth(&AuthOptions{ReqSignedIn: true})
ReqEditorRole = RoleAuth(models.ROLE_EDITOR, models.ROLE_ADMIN)
ReqOrgAdmin = RoleAuth(models.ROLE_ADMIN)
ReqSignedIn = Auth(&AuthOptions{ReqSignedIn: true})
ReqSignedInNoAnonymous = Auth(&AuthOptions{ReqSignedIn: true, ReqNoAnonynmous: true})
ReqEditorRole = RoleAuth(models.ROLE_EDITOR, models.ROLE_ADMIN)
ReqOrgAdmin = RoleAuth(models.ROLE_ADMIN)
)
func HandleNoCacheHeader(ctx *models.ReqContext) {