Permission fixes and washing reservation fixes

This commit is contained in:
frederikpyt
2020-07-29 11:53:37 +02:00
parent fc0f97b04e
commit 569ace008a
11 changed files with 73 additions and 127 deletions
@@ -9,6 +9,17 @@ use Spatie\Permission\Models\Role;
class rolesController extends Controller
{
public function __construct()
{
$this->middleware([ "auth" ]);
$this->middleware([ "check.auth:roles.list" ])->only("index");
$this->middleware([ "check.auth:roles.show" ])->only("show");
$this->middleware([ "check.auth:roles.create" ])->only("create", "store");
$this->middleware([ "check.auth:roles.edit" ])->only("edit", "update");
$this->middleware([ "check.auth:roles.delete" ])->only("delete");
}
/**
* Display a listing of the resource.
*