Skip to content

Commit 0183917

Browse files
committed
Support for multischool.
1 parent 4a3333b commit 0183917

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

usr/lib/python3/dist-packages/linuxmusterApi/routers_v1/managementgroups.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def remove_user_from_group(group: str, userlist: UserList, who: AuthenticatedUse
100100

101101
for member in userlist.users:
102102
try:
103-
GroupWriter = LMNMgmtGroup(group)
103+
GroupWriter = LMNMgmtGroup(group, school=who.school)
104104
GroupWriter.remove_member(member)
105105
except ldap.UNWILLING_TO_PERFORM as e:
106106
if 'Attribute member already deleted for target' in str(e):
@@ -145,7 +145,7 @@ def add_user_to_group(group: str, userlist: UserList, who: AuthenticatedUser = D
145145

146146
for member in userlist.users:
147147
try:
148-
GroupWriter = LMNMgmtGroup(group)
148+
GroupWriter = LMNMgmtGroup(group, school=who.school)
149149
GroupWriter.add_member(member)
150150
except ldap.ALREADY_EXISTS as e:
151151
if 'Attribute member already exists for target' in str(e):

0 commit comments

Comments
 (0)