auth for table conf page
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\Table;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class TablePolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public function edit(User $user, Table $table)
|
||||
{
|
||||
return $user->ownsTable($table);
|
||||
}
|
||||
|
||||
public function delete(User $user, Table $table)
|
||||
{
|
||||
return $user->ownsTable($table);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user