Skip to content

Commit

Permalink
Merge pull request #2086 from laws-africa/all-users
Browse files Browse the repository at this point in the history
Add users to All Users group
  • Loading branch information
actlikewill authored Oct 3, 2024
2 parents bb7739d + b0887c6 commit c3a7f40
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions peachjam/migrations/0163_allusers_group.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.15 on 2024-10-03 05:27

from django.db import migrations


def set_allusers(apps, schema_editor):
User = apps.get_model("auth", "User")
Group = apps.get_model("auth", "Group")
allusers_group, _ = Group.objects.get_or_create(name="AllUsers")

for user in User.objects.all():
user.groups.add(allusers_group)


class Migration(migrations.Migration):

dependencies = [
("peachjam", "0162_make_image_filenames_unique"),
]

operations = [
migrations.RunPython(set_allusers, migrations.RunPython.noop),
]

0 comments on commit c3a7f40

Please sign in to comment.