Misc: Remove unused params and impossible logic (#83756)

* remove unused params and impossible logic

* remove unused param
This commit is contained in:
Jo
2024-03-01 12:08:00 +01:00
committed by GitHub
parent 11d341d2bb
commit 0aebb9ee39
6 changed files with 8 additions and 11 deletions
+3 -3
View File
@@ -37,7 +37,7 @@ func Middleware(ac AccessControl) func(Evaluator) web.Handler {
}
if !c.IsSignedIn && forceLogin {
unauthorized(c, nil)
unauthorized(c)
return
}
}
@@ -49,7 +49,7 @@ func Middleware(ac AccessControl) func(Evaluator) web.Handler {
return
}
unauthorized(c, c.LookupTokenErr)
unauthorized(c)
return
}
@@ -113,7 +113,7 @@ func deny(c *contextmodel.ReqContext, evaluator Evaluator, err error) {
})
}
func unauthorized(c *contextmodel.ReqContext, err error) {
func unauthorized(c *contextmodel.ReqContext) {
if c.IsApiRequest() {
c.WriteErrOrFallback(http.StatusUnauthorized, http.StatusText(http.StatusUnauthorized), c.LookupTokenErr)
return