diff --git a/program/management/commands/addpermissions.py b/program/management/commands/addpermissions.py index db933a0a7f67aa828bdce618c756f7616632c0be..40147440bc98ab7c195dbdfda0d212916606da0e 100644 --- a/program/management/commands/addpermissions.py +++ b/program/management/commands/addpermissions.py @@ -12,33 +12,33 @@ class Command(BaseCommand): codename__startswith="edit" ) self.stdout.write( - " Adding app permissions to the privileged group... ", + f" Adding app permissions to the '{program_group}' group... ", ending="", ) self.stdout.flush() program_group.permissions.add(*app_permissions) self.stdout.write(self.style.SUCCESS(len(app_permissions))) - broadcast_group = Group.objects.get(name=settings.ENTITLED_GROUPS[0]) + host_group = Group.objects.get(name=settings.ENTITLED_GROUPS[0]) model_permissions = Permission.objects.filter( content_type__model__in=["note", "notelink"] ).exclude(codename__startswith="edit") self.stdout.write( - " Adding model permissions on note & notelink to the first entitled group... ", + f" Adding model permissions on note & notelink to the '{host_group}' group... ", ending="", ) self.stdout.flush() - broadcast_group.permissions.add(*model_permissions) + host_group.permissions.add(*model_permissions) self.stdout.write(self.style.SUCCESS(len(model_permissions))) - broadcast_plus_group = Group.objects.get(name=settings.ENTITLED_GROUPS[1]) + host_plus_group = Group.objects.get(name=settings.ENTITLED_GROUPS[1]) edit_permissions = Permission.objects.filter( codename__startswith="edit", content_type__model__in=["host", "note", "show"] ) self.stdout.write( - " Adding edit permissions on host, note & show to the second entitled group... ", + f" Adding edit permissions on host, note & show to the '{host_plus_group}' group... ", ending="", ) self.stdout.flush() - broadcast_plus_group.permissions.add(*edit_permissions) + host_plus_group.permissions.add(*edit_permissions) self.stdout.write(self.style.SUCCESS(len(edit_permissions)))