mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
DEV: Move UserApiKey scopes to dedicated table (#10704)
This has no functional impact yet, but it is the first step in adding more granular scopes to UserApiKeys
This commit is contained in:
@ -547,7 +547,7 @@ describe Auth::DefaultCurrentUserProvider do
|
||||
UserApiKey.create!(
|
||||
application_name: 'my app',
|
||||
client_id: '1234',
|
||||
scopes: ['read'],
|
||||
scopes: ['read'].map { |name| UserApiKeyScope.new(name: name) },
|
||||
user_id: user.id
|
||||
)
|
||||
end
|
||||
@ -556,7 +556,7 @@ describe Auth::DefaultCurrentUserProvider do
|
||||
dupe = UserApiKey.create!(
|
||||
application_name: 'my app',
|
||||
client_id: '12345',
|
||||
scopes: ['read'],
|
||||
scopes: ['read'].map { |name| UserApiKeyScope.new(name: name) },
|
||||
user_id: user.id
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user