🐛 Allow user creation without groups

If the default group gets actively deselected
during creation, it should not be automatically
added by the backend. Only add default groups
if no group info was provided at all, don't
add them if an empty list is provided.

Same for permissions.
This commit is contained in:
Gina Häußge committed 2022-09-08 18:11:21 +02:00
1 parent dc201416b6
commit 14aec95898
1 file changed
+2 -2
+2 -2
View File
@@ -628,11 +628,11 @@ class FilebasedUserManager(UserManager):
apikey=None,
overwrite=False,
):
if not permissions:
if permissions is None:
permissions = []
permissions = self._to_permissions(*permissions)
if not groups:
if groups is None:
groups = self._group_manager.default_groups
groups = self._to_groups(*groups)