Skip to content

Commit

Permalink
remove debug print. Renamed permission shortname
Browse files Browse the repository at this point in the history
  • Loading branch information
mhewel committed Nov 13, 2024
1 parent cbe98b3 commit bc58e93
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
4 changes: 0 additions & 4 deletions members/admin/union_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def get_fieldsets(self, request, obj=None):
# 20241113: https://stackoverflow.com/questions/16102222/djangoremove-superuser-checkbox-from-django-admin-panel-when-login-staff-users

if not obj:
print("not obj")
return self.add_fieldsets

info_fields = (
Expand All @@ -116,7 +115,6 @@ def get_fieldsets(self, request, obj=None):
)

if not request.user.has_perm("members.showledgeraccount"):
print("no perm")
info_fields = (
"bank_main_org",
"bank_account",
Expand All @@ -125,8 +123,6 @@ def get_fieldsets(self, request, obj=None):
"closed_at",
)

print(f"info:{info_fields}")

return [
(
"Navn og Adresse",
Expand Down
25 changes: 25 additions & 0 deletions members/migrations/0060_alter_union_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 4.2.11 on 2024-11-13 21:20

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("members", "0059_merge_20241113_2111"),
]

operations = [
migrations.AlterModelOptions(
name="union",
options={
"ordering": ["name"],
"permissions": (
("view_all_unions", "Can view all Foreninger"),
("show_ledger_account", "Show General Ledger Account"),
),
"verbose_name": "Forening",
"verbose_name_plural": "Foreninger",
},
),
]
2 changes: 1 addition & 1 deletion members/models/union.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Meta:
ordering = ["name"]
permissions = (
("view_all_unions", "Can view all Foreninger"),
("showledgeraccount", "Show General Ledger Account"),
("show_ledger_account", "Show General Ledger Account"),
)

help_union = """Vi tilføjer automatisk "Coding Pirates" foran navnet når vi nævner det de fleste steder på siden."""
Expand Down

0 comments on commit bc58e93

Please sign in to comment.