refactor jwt groups extractor

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
bcmmbaga
2024-09-17 18:18:59 +03:00
parent 258b30cf48
commit 3cf1b02f31
2 changed files with 42 additions and 54 deletions

View File

@@ -363,6 +363,8 @@ func (am *DefaultAccountManager) inviteNewUser(ctx context.Context, accountID, u
// GetUserByID looks up a user by provided user id.
func (am *DefaultAccountManager) GetUserByID(ctx context.Context, id string) (*User, error) {
unlock := am.Store.AcquireReadLockByUID(ctx, id)
defer unlock()
return am.Store.GetUserByUserID(ctx, id)
}