mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
DEV: Introduce plugin API to contribute user api key scopes
This commit is contained in:
@ -17,7 +17,11 @@ class UserApiKeyScope < ActiveRecord::Base
|
||||
}
|
||||
|
||||
def self.all_scopes
|
||||
SCOPES
|
||||
scopes = SCOPES
|
||||
DiscoursePluginRegistry.user_api_key_scope_mappings.each do |mapping|
|
||||
scopes = scopes.merge!(mapping)
|
||||
end
|
||||
scopes
|
||||
end
|
||||
|
||||
def permits?(env)
|
||||
|
Reference in New Issue
Block a user