Verified Commit 220f4be0 authored by Thibaut Broggi's avatar Thibaut Broggi
Browse files

Make command "init_groups" assign "padawan" group to all users

parent aaf50250
from import BaseCommand
from django.contrib.auth.models import Group, Permission
from django.contrib.auth.models import User, Group, Permission
groups = ["jedi", "padawan"]
permissions = {
......@@ -20,3 +20,7 @@ class Command(BaseCommand):
new_group, created = Group.objects.get_or_create(name=g)
for p in permissions[g]:
users = User.objects.all()
for user in users:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment