Skip to content

Commit

Permalink
fix auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinecraft committed Mar 21, 2024
1 parent 190a7b6 commit b3198e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ class AuthServiceProvider extends ServiceProvider
public function boot()
{
// Super Admin can do anything even if that permission is missing for him.
// TODO: Uncomment
// Gate::before(function ($user, $ability) {
// return $user->hasRole(Role::SUPER_ADMIN_ROLE_NAME) ? true : null;
// });
Gate::before(function ($user, $ability) {
return $user->hasRole(Role::SUPER_ADMIN_ROLE_NAME) ? true : null;
});

Gate::define('viewPulse', function (User $user) {
return $user->can('view pulse_admin_dashboard');
Expand Down
2 changes: 1 addition & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
Route::get('recruitment', [\App\Http\Controllers\Admin\RecruitmentController::class, 'index'])->name('recruitment.index');
Route::get('recruitment/create', [\App\Http\Controllers\Admin\RecruitmentController::class, 'create'])->name('recruitment.create');
Route::post('recruitment', [\App\Http\Controllers\Admin\RecruitmentController::class, 'store'])->name('recruitment.store');
Route::get('recruitment/{recruitment}', [\App\Http\Controllers\Admin\RecruitmentController::class, 'show'])->name('recruitment.show'); // TODO
Route::get('recruitment/{recruitment}', [\App\Http\Controllers\Admin\RecruitmentController::class, 'show'])->name('recruitment.show');
Route::get('recruitment/{recruitment}/edit', [\App\Http\Controllers\Admin\RecruitmentController::class, 'edit'])->name('recruitment.edit');
Route::put('recruitment/{recruitment}', [\App\Http\Controllers\Admin\RecruitmentController::class, 'update'])->name('recruitment.update');
Route::delete('recruitment/{recruitment}', [\App\Http\Controllers\Admin\RecruitmentController::class, 'destroy'])->name('recruitment.delete');
Expand Down

0 comments on commit b3198e3

Please sign in to comment.