Add dedicated user_api_key_clients table to allow for 1:many use cases (#28119)

This commit is contained in:
Angus McLeod
2024-11-08 18:05:03 +01:00
committed by GitHub
parent 534e8c1628
commit cb4b8146a3
17 changed files with 273 additions and 92 deletions

View File

@ -187,7 +187,7 @@ class Auth::DefaultCurrentUserProvider
.active
.joins(:user)
.where(key_hash: @hashed_user_api_key)
.includes(:user, :scopes)
.includes(:user, :scopes, :client)
.first
raise Discourse::InvalidAccess unless user_api_key_obj