formatting
This commit is contained in:
parent
d6e9343909
commit
ed33992643
@ -19,6 +19,8 @@ class SetPermissionControllerForApi
|
||||
return;
|
||||
}
|
||||
|
||||
// api/contacts?type=customer
|
||||
// api/contacts?type=vendor
|
||||
if ($event->table == 'contacts') {
|
||||
switch ($event->type) {
|
||||
case 'customer':
|
||||
@ -30,6 +32,8 @@ class SetPermissionControllerForApi
|
||||
}
|
||||
}
|
||||
|
||||
// api/documents?type=invoice
|
||||
// api/documents?type=bill
|
||||
if ($event->table == 'documents') {
|
||||
switch ($event->type) {
|
||||
case 'invoice':
|
||||
@ -41,6 +45,8 @@ class SetPermissionControllerForApi
|
||||
}
|
||||
}
|
||||
|
||||
// api/transactions?type=income
|
||||
// api/transactions?type=expense
|
||||
if ($event->table == 'transactions') {
|
||||
switch ($event->type) {
|
||||
case 'income':
|
||||
|
@ -442,12 +442,12 @@ trait Permissions
|
||||
if (in_array($controller, $skip)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// App\Http\Controllers\FooBar -->> foo-bar
|
||||
// App\Http\Controllers\FooBar\Main -->> foo-bar-main
|
||||
// Modules\Blog\Http\Controllers\Posts -->> blog-posts
|
||||
// Modules\Blog\Http\Controllers\Portal\Posts -->> blog-portal-posts
|
||||
}
|
||||
|
||||
// Add CRUD permission check
|
||||
$this->middleware('permission:create-' . $controller)->only('create', 'store', 'duplicate', 'import');
|
||||
|
Loading…
x
Reference in New Issue
Block a user