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:
@ -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:
|
||||
|
Reference in New Issue
Block a user