Restrict groups by state.

This commit is contained in:
colcrunch
2018-10-09 02:06:44 +00:00
committed by Basraah
parent 623e77a268
commit 9dd8357f67
5 changed files with 57 additions and 13 deletions

View File

@@ -3,6 +3,7 @@ from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from allianceauth.authentication.models import State
class GroupRequest(models.Model):
@@ -96,6 +97,10 @@ class AuthGroup(models.Model):
"specifically. Use the auth.group_management permission to allow "
"a user to manage all groups.")
states = models.ManyToManyField(State, related_name='valid_states', blank=True,
help_text="States listed here will have the ability to join this group provided "
"they have the proper permissions.")
description = models.CharField(max_length=512, blank=True, help_text="Description of the group shown to users.")
def __str__(self):