mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: fix contest scoreboard groups check (#820)
This commit is contained in:
1 parent
3a26cfbfe3
commit
d802a81a45
1 file changed
+1
-1
@@ -290,7 +290,7 @@ export class ContestScoreboardHandler extends ContestDetailBaseHandler {
|
||||
if (!realtime && this.tdoc.lockAt && !this.tdoc.unlocked) {
|
||||
config.lockAt = this.tdoc.lockAt;
|
||||
}
|
||||
const allGroups = this.user.hasPerm(PERM.PERM_EDIT_CONTEST_SELF) || (this.user.own(this.tdoc) && this.user.hasPerm(PERM.PERM_EDIT_CONTEST));
|
||||
const allGroups = (this.user.hasPerm(PERM.PERM_EDIT_CONTEST_SELF) && this.user.own(this.tdoc)) || this.user.hasPerm(PERM.PERM_EDIT_CONTEST);
|
||||
const [[, rows, udict, pdict], groups] = await Promise.all([
|
||||
contest.getScoreboard.call(this, domainId, tid, config),
|
||||
user.listGroup(domainId, allGroups ? undefined : this.user._id),
|
||||
|
||||
Reference in new issue
Block a user