Преглед на файлове

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

Here adding the auth_backend used.
Romain преди 6 години
родител
ревизия
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