Skip to content

Commit

Permalink
fix(vote): remove permissions to edit candidatures and flows
Browse files Browse the repository at this point in the history
  • Loading branch information
igr-santos committed Aug 30, 2024
1 parent 277b360 commit b2ea7ae
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/org_eleicoes/votepeloclima/candidature/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ class CandidatureAdmin(admin.ModelAdmin):

def has_add_permission(self, request):
return False

def has_change_permission(self, request, obj=None):
return False

def has_delete_permission(self, request, obj=None):
return False


class CandidatureFlowAdminForm(EntangledModelForm):
Expand Down Expand Up @@ -87,6 +93,12 @@ def political_party(self, obj):

def has_add_permission(self, request):
return False

def has_change_permission(self, request, obj=None):
return False

def has_delete_permission(self, request, obj=None):
return False


admin.site.register(Candidature, CandidatureAdmin)
Expand Down

0 comments on commit b2ea7ae

Please sign in to comment.