forked from AlpetGexha/Laravel-Asset-Management
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8aa16b6
commit 036f0d0
Showing
5 changed files
with
141 additions
and
107 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
<?php | ||
|
||
namespace App\Policies; | ||
|
||
use App\Models\User; | ||
use App\Models\Provaider; | ||
use Illuminate\Auth\Access\HandlesAuthorization; | ||
use Spatie\Activitylog\Models\Activity; | ||
|
||
class ActivityPolicy | ||
{ | ||
use HandlesAuthorization; | ||
|
||
/** | ||
* Determine whether the user can view any models. | ||
* | ||
* @return \Illuminate\Auth\Access\Response|bool | ||
*/ | ||
public function viewAny(User $user) | ||
{ | ||
return $user->isSuperAdmin(); | ||
} | ||
|
||
/** | ||
* Determine whether the user can view the model. | ||
* | ||
* @return \Illuminate\Auth\Access\Response|bool | ||
*/ | ||
public function view(User $user) | ||
{ | ||
return $user->isSuperAdmin(); | ||
} | ||
|
||
/** | ||
* Determine whether the user can create models. | ||
* | ||
* @return \Illuminate\Auth\Access\Response|bool | ||
*/ | ||
public function create(User $user) | ||
{ | ||
return $user->isSuperAdmin(); | ||
} | ||
|
||
/** | ||
* Determine whether the user can update the model. | ||
* | ||
* @return \Illuminate\Auth\Access\Response|bool | ||
*/ | ||
public function update(User $user, Activity $activity) | ||
{ | ||
return $user->isSuperAdmin(); | ||
} | ||
|
||
/** | ||
* Determine whether the user can delete the model. | ||
* | ||
* @return \Illuminate\Auth\Access\Response|bool | ||
*/ | ||
public function delete(User $user, Activity $activity) | ||
{ | ||
return $user->isSuperAdmin(); | ||
} | ||
|
||
/** | ||
* Determine whether the user can bulk delete. | ||
* | ||
* @return \Illuminate\Auth\Access\Response|bool | ||
*/ | ||
public function deleteAny(User $user) | ||
{ | ||
return $user->isSuperAdmin(); | ||
} | ||
|
||
/** | ||
* Determine whether the user can permanently delete. | ||
* | ||
* @return \Illuminate\Auth\Access\Response|bool | ||
*/ | ||
public function forceDelete(User $user, Activity $activity) | ||
{ | ||
return $user->isSuperAdmin(); | ||
} | ||
|
||
/** | ||
* Determine whether the user can permanently bulk delete. | ||
* | ||
* @return \Illuminate\Auth\Access\Response|bool | ||
*/ | ||
public function forceDeleteAny(User $user) | ||
{ | ||
return $user->isSuperAdmin(); | ||
} | ||
|
||
/** | ||
* Determine whether the user can restore. | ||
* | ||
* @return \Illuminate\Auth\Access\Response|bool | ||
*/ | ||
public function restore(User $user, Activity $activity) | ||
{ | ||
return $user->isSuperAdmin(); | ||
} | ||
|
||
/** | ||
* Determine whether the user can bulk restore. | ||
* | ||
* @return \Illuminate\Auth\Access\Response|bool | ||
*/ | ||
public function restoreAny(User $user) | ||
{ | ||
return $user->isSuperAdmin(); | ||
} | ||
|
||
/** | ||
* Determine whether the user can replicate. | ||
* | ||
* @return \Illuminate\Auth\Access\Response|bool | ||
*/ | ||
public function replicate(User $user, Activity $activity) | ||
{ | ||
return $user->isSuperAdmin(); | ||
} | ||
|
||
/** | ||
* Determine whether the user can reorder. | ||
* | ||
* @return \Illuminate\Auth\Access\Response|bool | ||
*/ | ||
public function reorder(User $user) | ||
{ | ||
return $user->isSuperAdmin(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters