fix(web/contest): manager register contest
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2022-11-06 15:30:15 +08:00
parent d84c21bf68
commit c93e5d3c46
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -302,7 +302,12 @@ class UOJContest {
'check-register' => false
];
if ($this->userCanManage($user) && !$this->userHasRegistered($user)) {
if ($this->userCanManage($user)) {
if ($this->userHasRegistered($user) && $this->progress() == CONTEST_IN_PROGRESS) {
$cfg['ensure'] && redirectTo($this->getUri('/confirm'));
return false;
}
return true;
}
if ($this->progress() == CONTEST_NOT_STARTED) {