mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix canViewContest
This commit is contained in:
1 parent
5c745fff82
commit
372782314e
1 file changed
+2
-2
@@ -551,13 +551,13 @@ export function canViewHiddenScoreboard() {
|
||||
|
||||
export function canShowRecord(tdoc: Tdoc<30 | 60>, allowPermOverride = true) {
|
||||
if (RULES[tdoc.rule].showRecord(tdoc, new Date())) return true;
|
||||
if (allowPermOverride && this.canViewHiddenScoreboard()) return true;
|
||||
if (allowPermOverride && canViewHiddenScoreboard.call(this)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
export function canShowScoreboard(tdoc: Tdoc<30 | 60>, allowPermOverride = true) {
|
||||
if (RULES[tdoc.rule].showScoreboard(tdoc, new Date())) return true;
|
||||
if (allowPermOverride && this.canViewHiddenScoreboard()) return true;
|
||||
if (allowPermOverride && canViewHiddenScoreboard.call(this)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user