HUE-8675 [core] Fix external users created as superuser

Review Request #13556 - Created Dec. 12, 2018 and submitted

Ying Chen
hue
master
HUE-8675
hue
jgauthier, johan, romain, weixia
commit bf832648d638d833fb1a1e5482a62b0476a19442 (HEAD -> master)
Author: Ying Chen <yingchen@cloudera.com>
Date:   Wed Dec 12 16:57:10 2018 -0800

    HUE-8675 [core] Fix external users created as superuser

:100644 100644 767e6e94ba... 52aad1f393... M    apps/useradmin/src/useradmin/old_migrations/0001_permissions_and_profiles.py
:100644 100644 79bdae2814... b70f390887... M    desktop/core/src/desktop/auth/backend.py
:100644 100644 4cb9771c5a... 677b3e473c... M    desktop/core/src/desktop/auth/views.py
:100644 100644 be7d821bbd... 79e60879d5... M    desktop/libs/liboauth/src/liboauth/backend.py
:100644 100644 c5682dc224... 7aad018f10... M    desktop/libs/libopenid/src/libopenid/backend.py
:100644 100644 bae1892daf... db0bb00401... M    desktop/libs/libsaml/src/libsaml/backend.py


  • 0
  • 0
  • 4
  • 0
  • 4
Description From Last Updated
  1. BTW: are we forgetting to set CreationMethod.EXTERNAL when creating the very first LDAP users somewhere? (hence the change below to just check if we have any user)

    1. Yes, CreationMethod.EXTERNAL vs CreationMethod.EXTERNAL.name. I was planning to put it to another review, and now put together.
      
      I think if not User.objects.exists(): is good for multi-backend auth, and also fixing existing wrong CreationMethod
  2. nit:

    if not User.objects.exists():

  3. 
      
  1. 
      
  2. desktop/core/src/desktop/auth/views.py (Diff revision 2)
     
     

    Add a note saying this is to fix a bug in Hue 4.3?

  3. We should revert this now?

  4. 
      
  1. 
      
  2. Why do we need to change it here if we did all the other updates?

  3. 
      
  1. Ship It!
  2. 
      
Review request changed

Status: Closed (submitted)

Loading...