We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c03280 commit e2d2bfcCopy full SHA for e2d2bfc
framework/authorization.rb
@@ -470,9 +470,13 @@ def sort_groups groups
470
# Returns the allowed_groups from the request
471
def get_allowed_groups
472
allowed_groups_s = request.env["HTTP_MU_AUTH_ALLOWED_GROUPS"]
473
- allowed_groups =
474
- allowed_groups_s ? JSON.parse(allowed_groups_s) : []
475
-
+ if allowed_groups_s.nil? || allowed_groups_s.length == 0
+ # TODO: this isn't very clean and relies on ruby-template internals
+ response = query("ASK {?s ?p ?o}")
476
+ allowed_groups = JSON.parse(RequestStore.store[:mu_auth_allowed_groups])
477
+ else
478
+ allowed_groups = JSON.parse(allowed_groups_s)
479
+ end
480
return sort_groups(allowed_groups)
481
end
482
0 commit comments