mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: allow manually disable training enrolled users
This commit is contained in:
1 file changed
+1
-1
@@ -104,7 +104,7 @@ class TrainingDetailHandler extends Handler {
|
||||
let enrollUsers: number[] = [];
|
||||
let shouldCompare = false;
|
||||
const pids = training.getPids(tdoc.dag);
|
||||
if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE)) {
|
||||
if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE) && this.ctx.setting.get('training.enrolled-list')) {
|
||||
enrollUsers = (await training.getMultiStatus(domainId, { docId: tid, uid: { $gt: 1 }, enroll: 1 })
|
||||
.project({ uid: 1 }).limit(500).toArray()).map((x) => +x.uid);
|
||||
shouldCompare = uid !== this.user._id;
|
||||
|
||||
Reference in new issue
Block a user