🆙 Add fixed cms 🆙
This commit is contained in:
1 parent
b1a2cab62d
commit
b67e0ec2b9
3982 files changed
+193682
No files matched your search
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
use Illuminate\Auth\Access\Response;
|
||||
|
||||
class UserPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
/**
|
||||
* Determine whether the user can view any models.
|
||||
*
|
||||
* @return Response|bool
|
||||
*/
|
||||
public function viewAny(User $user)
|
||||
{
|
||||
return hasHousekeepingPermission('edit_user');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can view the model.
|
||||
*
|
||||
* @return Response|bool
|
||||
*/
|
||||
public function view(User $user)
|
||||
{
|
||||
return hasHousekeepingPermission('edit_user');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can update the model.
|
||||
*
|
||||
* @return Response|bool
|
||||
*/
|
||||
public function update(User $user)
|
||||
{
|
||||
return hasHousekeepingPermission('edit_user');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can delete the model.
|
||||
*
|
||||
* @return Response|bool
|
||||
*/
|
||||
public function delete(User $user)
|
||||
{
|
||||
return hasHousekeepingPermission('delete_user');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user