feat(web): disable normal user download testdata
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2022-10-28 10:16:34 +08:00
parent 512185fc10
commit 0689c94351
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
3 changed files with 6 additions and 3 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
uoj_data/ uoj_data/
uoj_data_1/
uoj_data_2/
.php-cs-fixer.cache .php-cs-fixer.cache
docker-compose.local.yml docker-compose.local.yml

View File

@ -41,8 +41,8 @@
become404Page(); become404Page();
} }
if (!isProblemVisibleToUser($problem, $myUser)) { if (!hasProblemPermission($myUser, $problem)) {
become404Page(); become403Page();
} }
$id = $_GET['id']; $id = $_GET['id'];
@ -56,7 +56,7 @@
become404Page(); become404Page();
} }
if (!isProblemVisibleToUser($problem, $myUser)) { if (!hasProblemPermission($myUser, $problem)) {
become404Page(); become404Page();
} }

View File

@ -971,6 +971,7 @@ EOD,
<li>用户被封禁后将不能再次登录系统。</li> <li>用户被封禁后将不能再次登录系统。</li>
<li>将当前用户移除权限后将无法再次访问本页面。</li> <li>将当前用户移除权限后将无法再次访问本页面。</li>
<li>在修改用户类别前请仔细核对用户名以免产生不必要的麻烦。</li> <li>在修改用户类别前请仔细核对用户名以免产生不必要的麻烦。</li>
<li>如需为用户设置题目上传者、题目管理员等权限,请前往对应用户的个人资料编辑页面,点击「特权」选项卡修改。</li>
</ul> </ul>
</div> </div>
</div> </div>