diff --git a/module_build_service/auth.py b/module_build_service/auth.py index 8bfb9eba..b4169342 100644 --- a/module_build_service/auth.py +++ b/module_build_service/auth.py @@ -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"} diff --git a/module_build_service/views.py b/module_build_service/views.py index 759f9191..6810e0e0 100644 --- a/module_build_service/views.py +++ b/module_build_service/views.py @@ -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):