FEATURE #2048: prepare routes for ACL, add some more permissions
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
<?php
|
||||
// these routes are available only for user with role admin
|
||||
Route::group(['middleware' => 'onlyAdmin', 'namespace' => 'Templates'], function () {
|
||||
Route::group(['namespace' => 'Templates'], function () {
|
||||
Route::get('templates/overview/path/{templatePath}', 'TemplateOverview@getPath')
|
||||
->name('templates.overview');
|
||||
->name('templates.overview')
|
||||
->middleware('can:manage,' . \App\Models\Templates\Template::class);
|
||||
|
||||
Route::post('templates/copy', 'CopyTemplate@createCopy')
|
||||
->name('templates.postCopy');
|
||||
->name('templates.postCopy')
|
||||
->middleware('can:copy,' . \App\Models\Templates\Template::class);
|
||||
|
||||
Route::get('templates/edit/{template}', 'EditTemplate@getEdit')
|
||||
->name('templates.edit');
|
||||
->name('templates.edit')
|
||||
->middleware('can:update,template');
|
||||
|
||||
Route::post('templates/edit/{template}', 'EditTemplate@postEdit')
|
||||
->name('templates.postEdit');
|
||||
->name('templates.postEdit')
|
||||
->middleware('can:update,template');
|
||||
});
|
||||
Reference in New Issue
Block a user