fix: return 403 when non-admin tries to do admin requests
This commit is contained in:
@@ -48,7 +48,7 @@ func RequireAdmin(rm *roles.Manager, logger log.Logger) func(next http.Handler)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
errorcode.AccessDenied.Render(w, r, http.StatusUnauthorized, "Unauthorized")
|
errorcode.AccessDenied.Render(w, r, http.StatusForbidden, "Forbidden")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user