FEATURE #2047: use laravel's authorization

This commit is contained in:
Michal Kváček
2017-08-02 13:33:26 +02:00
parent 67fb3c6945
commit a4c020daa0
60 changed files with 1357 additions and 50 deletions
+15
View File
@@ -0,0 +1,15 @@
<?php
// these routes are available only for user with role admin
Route::group(['middleware' => 'onlyAdmin', 'namespace' => 'Templates'], function () {
Route::get('templates/overview/path/{templatePath}', 'TemplateOverview@getPath')
->name('templates.overview');
Route::post('templates/copy', 'CopyTemplate@createCopy')
->name('templates.postCopy');
Route::get('templates/edit/{template}', 'EditTemplate@getEdit')
->name('templates.edit');
Route::post('templates/edit/{template}', 'EditTemplate@postEdit')
->name('templates.postEdit');
});