Auth: Add SyncPermissions post auth hook (#64205)

* Add SyncPermissionsFromDB post auth hook

* Delete FromDB prefix

* Align tests

* Fixes

* Change SyncPermissionsHook prio
This commit is contained in:
Misi
2023-03-08 13:35:54 +01:00
committed by GitHub
parent aa123e0d50
commit 6543259a7d
20 changed files with 177 additions and 18 deletions

View File

@@ -70,6 +70,7 @@ func (s *JWT) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identi
ClientParams: authn.ClientParams{
SyncUser: true,
FetchSyncedUser: true,
SyncPermissions: true,
SyncOrgRoles: !s.cfg.JWTAuthSkipOrgRoleSync,
AllowSignUp: s.cfg.JWTAuthAutoSignUp,
}}