FEATURE #2048: prepare routes for ACL, add some more permissions
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
Route::group(['namespace' => 'Contents'], function () {
|
||||
// list of all static pages
|
||||
Route::get('content/overview/{module?}', 'ContentOverview@index')
|
||||
->name('content.overview');
|
||||
->name('content.overview')
|
||||
->middleware('can:manage,' . \App\Models\Content\Content::class);
|
||||
|
||||
// form for creating new static page
|
||||
Route::get('content/new/{module}', 'CreateNewContent@create')
|
||||
@@ -16,29 +17,36 @@ Route::group(['namespace' => 'Contents'], function () {
|
||||
|
||||
// post method for creating new static page
|
||||
Route::post('content/new/{module}', 'CreateNewContent@store')
|
||||
->name('content.newPost');
|
||||
->name('content.newPost')
|
||||
->middleware('can:create,module');
|
||||
|
||||
// post method for creating new static page
|
||||
Route::post('content/edit/{page}', 'EditContent@update')
|
||||
->name('content.editPost');
|
||||
->name('content.editPost')
|
||||
->middleware('can:update,page');
|
||||
|
||||
// change status of page (protected, public or draft)
|
||||
Route::get('content/status/{page}/{status}', 'ContentActions@changeStatus')
|
||||
->name('content.changeStatus');
|
||||
->name('content.changeStatus')
|
||||
->middleware('can:changeStatus,page');
|
||||
|
||||
// set homepage
|
||||
Route::get('content/homepage/{page}', 'ContentActions@setHomepage')
|
||||
->name('content.setHomepage');
|
||||
->name('content.setHomepage')
|
||||
->middleware('can:setHomepage,page');
|
||||
|
||||
// delete page
|
||||
Route::get('content/delete/{page}', 'ContentActions@delete')
|
||||
->name('content.delete');
|
||||
->name('content.delete')
|
||||
->middleware('can:delete,page');
|
||||
|
||||
// history of changes for specified page
|
||||
Route::get('history/{page}', 'History@getOverview')
|
||||
->name('content.history');
|
||||
->name('content.history')
|
||||
->middleware('can:viewHistory,page');
|
||||
|
||||
// history of changes for specified page
|
||||
Route::get('history/{revision}', 'History@getDiff')
|
||||
->name('history.diff');
|
||||
->name('history.diff')
|
||||
->middleware('can:viewHistory,page');
|
||||
});
|
||||
Reference in New Issue
Block a user