DONE: layout letter with letterhead and footer, notification for newly...
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Activity\Policies;
|
||||
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
use Modules\Activity\Entities\ActivityReport;
|
||||
|
||||
class ActivityReportPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny($user): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function view($user, ?ActivityReport $activityReport = null): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function create($user): bool
|
||||
{
|
||||
return $user->hasPermissionTo('tambah laporan aktiviti');
|
||||
}
|
||||
|
||||
public function update($user, ?ActivityReport $activityReport = null): bool
|
||||
{
|
||||
return $user->hasPermissionTo('kemaskini laporan aktiviti');
|
||||
}
|
||||
|
||||
public function deleteAny($user): bool
|
||||
{
|
||||
return $user->hasPermissionTo('hapus laporan aktiviti');
|
||||
}
|
||||
|
||||
public function delete($user, ?ActivityReport $activityReport = null): bool
|
||||
{
|
||||
return $user->hasPermissionTo('hapus laporan aktiviti');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user