Skip to content

Commit a73fcb4

Browse files
committed
coach kind for role creation as coach of specific class
1 parent 5c6b90d commit a73fcb4

File tree

1 file changed

+1
-7
lines changed
  • kolibri/plugins/facility/assets/src/views/users/sidePanels/UserCreate

1 file changed

+1
-7
lines changed

kolibri/plugins/facility/assets/src/views/users/sidePanels/UserCreate/index.vue

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -366,16 +366,10 @@
366366
const assignCoachToClasses = (userId, classIds) => {
367367
// The endpoint still expects COACH for the kind when assigning,
368368
// even if the user's facility role is an admin
369-
let kind;
370-
if (newUserRole.value === UserKinds.ADMIN) {
371-
kind = UserKinds.COACH;
372-
} else {
373-
kind = newUserRole.value;
374-
}
375369
return client({
376370
url: urls['kolibri:core:role_list'](),
377371
method: 'POST',
378-
data: classIds.map(cid => ({ collection: cid, user: userId, kind })),
372+
data: classIds.map(cid => ({ collection: cid, user: userId, kind: UserKinds.COACH })),
379373
});
380374
};
381375

0 commit comments

Comments
 (0)