# HG changeset patch # User Kim Alvefur # Date 1683885500 -7200 # Node ID b071d8ee65551b350c0722a97ae73ae99d3ef87f # Parent 6705f2a097021c77dc6a18002c217560c741b02d mod_http_oauth2: Show only roles the user can use in consent dialog Confusing if it shows you roles you can't use. diff -r 6705f2a09702 -r b071d8ee6555 mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Fri May 12 11:11:38 2023 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Fri May 12 11:58:20 2023 +0200 @@ -682,6 +682,7 @@ elseif auth_state.consent == nil then -- Render consent page local scopes, roles = split_scopes(requested_scopes); + roles = user_assumable_roles(auth_state.user.username, roles); return render_page(templates.consent, { state = auth_state; client = client; scopes = scopes+roles }, true); elseif not auth_state.consent then -- Notify client of rejection