Skip to content
Snippets Groups Projects

feat: added eduperson scopes to heuristic endpoints

Merged Marek Hlávka requested to merge heuristic-page-autorization into main
All threads resolved!
+ 2
2
@@ -482,7 +482,7 @@ def construct_gui_blueprint(cfg, auth):
@auth.oidc_auth(OIDC_CFG["provider_name"])
def heuristic_get_id():
if not check_scope_claim("heuristic_pages", OIDC_CFG):
return ("User does not have access to this page",), HTTPStatus.BAD_REQUEST
return "User does not have access to this page", HTTPStatus.FORBIDDEN
return render_template(
"HeuristicData.html",
@@ -499,7 +499,7 @@ def construct_gui_blueprint(cfg, auth):
return "User ID not provided in the request", HTTPStatus.BAD_REQUEST
if not check_scope_claim("heuristic_pages", OIDC_CFG):
return ("User does not have access to this page",), HTTPStatus.BAD_REQUEST
return "User does not have access to this page", HTTPStatus.FORBIDDEN
try:
user_id = int(user_id)
Loading