We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c6b90d commit a73fcb4Copy full SHA for a73fcb4
kolibri/plugins/facility/assets/src/views/users/sidePanels/UserCreate/index.vue
@@ -366,16 +366,10 @@
366
const assignCoachToClasses = (userId, classIds) => {
367
// The endpoint still expects COACH for the kind when assigning,
368
// 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
- }
375
return client({
376
url: urls['kolibri:core:role_list'](),
377
method: 'POST',
378
- data: classIds.map(cid => ({ collection: cid, user: userId, kind })),
+ data: classIds.map(cid => ({ collection: cid, user: userId, kind: UserKinds.COACH })),
379
});
380
};
381
0 commit comments