From a00d95608b462e485c2d538a660265d0b120d904 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Wed, 23 Sep 2020 21:36:04 +0200 Subject: [PATCH] Add permission to treasurers to create a club, fix the permission check to renew a membership --- apps/member/tables.py | 2 +- apps/permission/fixtures/initial.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/member/tables.py b/apps/member/tables.py index 8c979f08..bc40368c 100644 --- a/apps/member/tables.py +++ b/apps/member/tables.py @@ -112,7 +112,7 @@ class MembershipTable(tables.Table): fee=0, ) if PermissionBackend.check_perm(get_current_authenticated_user(), - "member:add_membership", empty_membership): # If the user has right + "member.add_membership", empty_membership): # If the user has right renew_url = reverse_lazy('member:club_renew_membership', kwargs={"pk": record.pk}) t = format_html( diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index 49d595ac..6769c0ae 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -2988,6 +2988,7 @@ 137, 138, 139, + 140, 143, 146, 147,