Преглед изворни кода

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

Here adding the auth_backend used.
Romain пре 5 година
родитељ
комит
8661c1e064
1 измењених фајлова са 3 додато и 0 уклоњено
  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