fix: add missing permission in populate

This commit is contained in:
imperosol committed 2026-10-26 13:24:16 +01:00
1 parent 9bc6518d95
commit c5015f4448
1 file changed
+15 -13
+15 -13
View File
@@ -864,7 +864,11 @@ class Command(BaseCommand):
subscribers = Group.objects.create(name="Cotisants") subscribers = Group.objects.create(name="Cotisants")
subscribers.permissions.add( subscribers.permissions.add(
*list(perms.filter(codename__in=["add_news", "add_uecomment"])) *list(
perms.filter(
codename__in=["add_news", "add_uecomment", "add_self_timetable"]
)
)
) )
old_subscribers = Group.objects.create(name="Anciens cotisants") old_subscribers = Group.objects.create(name="Anciens cotisants")
old_subscribers.permissions.add( old_subscribers.permissions.add(
@@ -893,18 +897,16 @@ class Command(BaseCommand):
accounting_admin.permissions.add( accounting_admin.permissions.add(
*list( *list(
perms.filter( perms.filter(
Q( codename__in=[
codename__in=[ "view_customer",
"view_customer", "view_product",
"view_product", "change_product",
"change_product", "add_product",
"add_product", "view_producttype",
"view_producttype", "change_producttype",
"change_producttype", "add_producttype",
"add_producttype", "delete_selling",
"delete_selling", ]
]
)
).values_list("pk", flat=True) ).values_list("pk", flat=True)
) )
) )