Aplikasi Keuangan yang mengatur lalu lintas transaksi antara bank dan aplikasi internal Kampus
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

49 lines
1.2 KiB

<?php
namespace App\Domains\Academic\Policies;
use App\Domains\Academic\Models\StudyProgram;
use App\Domains\Identity\Models\User;
class StudyProgramPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->hasPermissionTo('study-program.viewAny');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, StudyProgram $model): bool
{
return $user->hasPermissionTo('study-program.view');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->hasPermissionTo('study-program.create');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, StudyProgram $model): bool
{
return $user->hasPermissionTo('study-program.update');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, StudyProgram $model): bool
{
return $user->hasPermissionTo('study-program.delete');
}
}