mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
DEV: Add support for allowed parameters in user api key scopes
Initially, this feature is only intended for use in core/plugins, so there is no API for requesting a parameter-scoped key. That may change in future.
This commit is contained in:
@ -8,3 +8,10 @@ Fabricator(:readonly_user_api_key, from: :user_api_key) do
|
||||
client_id { SecureRandom.hex }
|
||||
application_name 'some app'
|
||||
end
|
||||
|
||||
Fabricator(:bookmarks_calendar_user_api_key, from: :user_api_key) do
|
||||
user
|
||||
scopes { [Fabricate.build(:user_api_key_scope, name: 'bookmarks_calendar')] }
|
||||
client_id { SecureRandom.hex }
|
||||
application_name 'some app'
|
||||
end
|
||||
|
Reference in New Issue
Block a user