FIX: fix content dependency on categories

This commit is contained in:
Michal Kváček
2017-08-24 02:50:30 +02:00
parent ac8e3aeacc
commit 5abd7d9151
36 changed files with 574 additions and 71 deletions
+6 -5
View File
@@ -7,8 +7,8 @@ Route::group(['namespace' => 'Contents'], function () {
// form for creating new static page
Route::get('content/new/{module}', 'CreateNewContent@create')
->name('content.new')
->middleware(['can:create,module', 'can:create,' . \App\Models\Content\Content::class]);
->name('content.new')// ->middleware(['can:create,module', 'can:create,' . \App\Models\Content\Content::class]);
->middleware('can:create,' . \App\Models\Content\Content::class);
// form for editing existing static page
Route::get('content/edit/{page}', 'EditContent@edit')
@@ -18,7 +18,8 @@ Route::group(['namespace' => 'Contents'], function () {
// post method for creating new static page
Route::post('content/new/{module}', 'CreateNewContent@store')
->name('content.newPost')
->middleware('can:create,module');
->middleware('can:create,' . \App\Models\Content\Content::class);
// ->middleware('can:create,module');
// post method for creating new static page
Route::post('content/edit/{page}', 'EditContent@update')
@@ -46,7 +47,7 @@ Route::group(['namespace' => 'Contents'], function () {
->middleware('can:viewHistory,page');
// history of changes for specified page
Route::get('history/{revision}', 'History@getDiff')
Route::get('history/diff/{revision}', 'History@getDiff')
->name('history.diff')
->middleware('can:viewHistory,page');
->middleware('can:viewHistory,'.\App\Models\Content\Content::class);
});