Skip to content
Snippets Groups Projects
Verified Commit 03bb824e authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

feat: add authorizeRequestPrivilegedOrEntitled

parent 435a6ad5
No related branches found
No related tags found
No related merge requests found
......@@ -221,3 +221,13 @@ func authorizeRequest(c *gin.Context, api *API) (bool, *auth.Session) {
return authorizeRequestAllShows(c)
}
func authorizeRequestPrivilegedOrEntitled(c *gin.Context) (bool, *auth.Session) {
s := getAuthSession(c.Request)
if s.Privileged || s.Entitled {
return true, s
}
return false, nil
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment