2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 21:15:41 +00:00

setting to register group on signup

This commit is contained in:
Matthias
2021-10-14 21:27:09 +02:00
parent 0e589533e5
commit b26bf780c3
3 changed files with 27 additions and 3 deletions

View File

@ -11,7 +11,7 @@ import decimal
import math
from django.db import models, transaction
from django.contrib.auth.models import User
from django.contrib.auth.models import User, Group
from django.db.utils import IntegrityError, OperationalError
from django.conf import settings
@ -845,6 +845,15 @@ class InvenTreeSetting(BaseInvenTreeSetting):
'default': True,
'validator': bool,
},
'SIGNUP_GROUP': {
'name': _('Group on signup'),
'description': _('Group new user are asigned on registration'),
'default': '',
'choices': [
('', _('No group')),
*[(str(a.id), str(a)) for a in Group.objects.all()]
],
},
}
class Meta: