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:
David Taylor
2020-09-29 10:57:48 +01:00
committed by GitHub
parent 91ac70a32d
commit 1ba9b34b03
11 changed files with 98 additions and 20 deletions

View File

@ -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
)