mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-08 15:53:18 +08:00
Don't allow NO_AUTH to be anything
This commit is contained in:
@@ -83,7 +83,7 @@ def get_user(request):
|
||||
Returns the client's username and groups based on the OIDC token provided.
|
||||
"""
|
||||
|
||||
if app.config['NO_AUTH']:
|
||||
if app.config['NO_AUTH'] is True:
|
||||
log.debug("Authorization is disabled.")
|
||||
return "anonymous", {"packager"}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ class ModuleBuildAPI(MethodView):
|
||||
else:
|
||||
handler = SCMHandler(request)
|
||||
|
||||
if conf.no_auth and handler.username == "anonymous" and "owner" in handler.data:
|
||||
if conf.no_auth is True and handler.username == "anonymous" and "owner" in handler.data:
|
||||
handler.username = handler.data["owner"]
|
||||
|
||||
if conf.allowed_groups and not (conf.allowed_groups & handler.groups):
|
||||
|
||||
Reference in New Issue
Block a user