Skip to content

Commit

Permalink
release: 0.17.4 Characinae Build Pack 4
Browse files Browse the repository at this point in the history
release: 0.17.4 Characinae Build Pack 4
  • Loading branch information
ZsgsDesign committed Nov 4, 2021
2 parents 2b97b95 + 5e56581 commit a292143
Show file tree
Hide file tree
Showing 11 changed files with 169 additions and 117 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

All notable changes to this project will be documented in this file.

## NOJ 0.17.4 Characinae Build Pack 4 - 2021-11-03
This is a build version update for `0.17.0 Characinae`.

**Important:** Rerun `npm ci` and `composer install` then `npm run production`.

### Update Logs
* **New:** NOJ now supports `contest.exsits` middleware.
* **New:** NOJ now uses Github markdown style to render messages.
* **Fixed:** A PHP7.4 compatibility bug causing contest details to return 500 when users don't have clearance.
* **Improved:** Remastered contest routers.
* **Security:** `encore/laravel-admin` is now at `1.8.16`.
* **Security:** `laravel/framework` is now at `8.69.0`.
* **Security:** `laravel/passport` is now at `10.2.0`.
* **Security:** `laravel/ui` is now at `3.3.1`.
* **Security:** `phpseclib/phpseclib` is now at `3.0.11`.
* **Security:** `symfony/console` is now at `5.3.10`.
* **Security:** `symfony/http-foundation` is now at `5.3.10`.
* **Security:** `symfony/http-kernel` is now at `5.3.10`.
* **Security:** `symfony/string` is now at `5.3.10`.
* **Security:** `symfony/translation` is now at `5.3.10`.
* **Security:** `symfony/var-dumper` is now at `5.3.10`.

## NOJ 0.17.3 Characinae Build Pack 3 - 2021-10-30
This is a build version update for `0.17.0 Characinae`.

Expand Down
6 changes: 5 additions & 1 deletion app/Http/Controllers/Contest/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ public function detail($cid)
if (Auth::check()) {
$contest_detail=$contestModel->detail($cid, Auth::user()->id);
$registration=$contestModel->registration($cid, Auth::user()->id);
$inGroup=$groupModel->isMember($contest_detail["data"]["contest_detail"]["gid"], Auth::user()->id);
if(filled($contest_detail["data"])) {
$inGroup=$groupModel->isMember($contest_detail["data"]["contest_detail"]["gid"], Auth::user()->id);
} else {
$inGroup = false;
}
} else {
$contest_detail=$contestModel->detail($cid);
$registration=[];
Expand Down
1 change: 1 addition & 0 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class Kernel extends HttpKernel
'group.exist' => \App\Http\Middleware\Group\Exists::class,
'group.banned' => \App\Http\Middleware\Group\Banned::class,

'contest.exists' => \App\Http\Middleware\Contest\Exists::class,
'contest.desktop' => \App\Http\Middleware\Contest\IsDesktop::class,
'contest.board.admin.pdfview.clearance' => \App\Http\Middleware\Contest\Board\Admin\PDFView\Clearance::class,

Expand Down
24 changes: 24 additions & 0 deletions app/Http/Middleware/Contest/Exists.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace App\Http\Middleware\Contest;

use Closure;
use App\Models\Eloquent\Contest;

class Exists
{
public function handle($request, Closure $next)
{
$contest = Contest::find($request->cid);

if(blank($contest)) {
return redirect()->route('contest.index');
}

$request->merge([
'contestInstance' => $contest
]);

return $next($request);
}
}
Loading

0 comments on commit a292143

Please sign in to comment.