Skip to content

Commit

Permalink
fix(domains): add permissions to delete and change hosted zones only …
Browse files Browse the repository at this point in the history
…superuser
  • Loading branch information
igr-santos committed Dec 18, 2023
1 parent feb23e1 commit 5d4fe52
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/contrib/domains/route53/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,16 @@ class Media:
}

def has_add_permission(self, request: HttpRequest) -> bool:
return False
if not request.user.is_superuser:
return False

return super(HostedZoneAdmin, self).has_add_permission(request)

def has_change_permission(self, request: HttpRequest, obj=None) -> bool:
return False
if not request.user.is_superuser:
return False

return super(HostedZoneAdmin, self).has_change_permission(request, obj=obj)

def vps(self, obj):
html = "<ul class='tags'>"
Expand Down

0 comments on commit 5d4fe52

Please sign in to comment.