Change authorized applications page (#17656)
* Change authorized applications page * Hide revoke button for superapps and suspended accounts * Clean up db/schema.rb
This commit is contained in:
parent
233f7e6174
commit
50ea54b3ed
20 changed files with 393 additions and 62 deletions
|
@ -224,4 +224,19 @@ module ApplicationHelper
|
|||
content_tag(:script, json_escape(json).html_safe, id: 'initial-state', type: 'application/json')
|
||||
# rubocop:enable Rails/OutputSafety
|
||||
end
|
||||
|
||||
def grouped_scopes(scopes)
|
||||
scope_parser = ScopeParser.new
|
||||
scope_transformer = ScopeTransformer.new
|
||||
|
||||
scopes.each_with_object({}) do |str, h|
|
||||
scope = scope_transformer.apply(scope_parser.parse(str))
|
||||
|
||||
if h[scope.key]
|
||||
h[scope.key].merge!(scope)
|
||||
else
|
||||
h[scope.key] = scope
|
||||
end
|
||||
end.values
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue