소스 검색

HUE-8758 [useradmin] Revert HuePermission creation to be simpler

Romain 5 년 전
부모
커밋
3db939a2db
1개의 변경된 파일1개의 추가작업 그리고 10개의 파일을 삭제
  1. 1 10
      apps/useradmin/src/useradmin/models.py

+ 1 - 10
apps/useradmin/src/useradmin/models.py

@@ -354,16 +354,7 @@ def update_app_permissions(**kwargs):
           else:
             uptodate += 1
         else:
-          attributes = {
-            'app': app_name,
-            'action': action,
-            'description': description
-          }
-          # if ENABLE_ORGANIZATIONS.get():
-          #   # Or move signals instead
-          #   attributes['organization'] = kwargs['organization'] if kwargs.get('organization') else default_organization()
-
-          new_dp = HuePermission(**attributes)
+          new_dp = HuePermission(app=app_name, action=action, description=description)
           new_dp.save()
           added.append(new_dp)