Explorar o código

HUE-8758 [auth] Also augment the user with some of the profile properties

Here adding the auth_backend used.
Romain %!s(int64=5) %!d(string=hai) anos
pai
achega
8661c1e064
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      desktop/core/src/desktop/auth/backend.py

+ 3 - 0
desktop/core/src/desktop/auth/backend.py

@@ -96,6 +96,9 @@ def rewrite_user(user):
     augment = get_user_augmentation_class()(user)
     for attr in ("get_groups", "get_home_directory", "has_hue_permission"):
       setattr(user, attr, getattr(augment, attr))
+
+    profile_data = get_profile(user).data
+    setattr(user, 'auth_backend', profile_data.get('auth_backend'))
   return user