core: fix canViewContest

This commit is contained in:
undefined authored and GitHub committed 2021-05-12 16:44:35 +08:00
1 parent 5c745fff82
commit 372782314e
1 file changed
+2 -2
+2 -2
View File
@@ -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;
}