Skip to content

Commit

Permalink
CH-158 option to edit user on django
Browse files Browse the repository at this point in the history
  • Loading branch information
filippomc committed Nov 5, 2024
1 parent 2c11b31 commit 6c85656
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
class CHUserAdmin(ExtraButtonsMixin, UserAdmin):

def has_add_permission(self, request):
return settings.DEBUG
return settings.DEBUG or settings.USER_CHANGE_ENABLED

def has_change_permission(self, request, obj=None):
return settings.DEBUG
return settings.DEBUG or settings.USER_CHANGE_ENABLED

def has_delete_permission(self, request, obj=None):
return settings.DEBUG
return settings.DEBUG or settings.USER_CHANGE_ENABLED

@button()
def sync_keycloak(self, request):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
'cloudharness_django.middleware.BearerTokenMiddleware',
]

USER_CHANGE_ENABLED = False

# test if the kubernetes CH all values exists, if so then set up specific k8s stuff
# IMPROTANT NOTE:
# when testing/debugging with Kafka then copy the deployment/helm/values.yaml to the ALLVALUES_PATH
Expand Down

0 comments on commit 6c85656

Please sign in to comment.