diff --git a/app/Http/Controllers/Api/Web/TracksController.php b/app/Http/Controllers/Api/Web/TracksController.php index b5912907..83c6bb28 100644 --- a/app/Http/Controllers/Api/Web/TracksController.php +++ b/app/Http/Controllers/Api/Web/TracksController.php @@ -40,7 +40,6 @@ class TracksController extends ApiControllerBase { session_write_close(); - return $this->execute(new UploadTrackCommand(true)); } diff --git a/app/Http/routes.php b/app/Http/routes.php index a3889ec7..57f3edb5 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -82,7 +82,7 @@ Route::group(['prefix' => 'api/v1', 'middleware' => 'json-exceptions'], function Route::group(['prefix' => 'api/web'], function() { Route::get('/taxonomies/all', 'Api\Web\TaxonomiesController@getAll'); - Route::get('/search', ['middleware' => ['auth', 'can:access-search'], 'uses' => 'Api\Web\SearchController@getSearch']); + Route::get('/search', 'Api\Web\SearchController@getSearch'); Route::get('/tracks', 'Api\Web\TracksController@getIndex'); Route::get('/tracks/{id}', 'Api\Web\TracksController@getShow')->where('id', '\d+'); diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index e01fb068..96b1b6c1 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -48,10 +48,6 @@ class AuthServiceProvider extends ServiceProvider */ public function boot(GateContract $gate) { - $gate->define('access-search', function(User $user) { - return $user->hasRole('admin') || $user->hasRole('moderator'); - }); - $gate->define('access-admin-area', function(User $user) { return $user->hasRole('admin'); }); diff --git a/resources/views/shared/_app_layout.blade.php b/resources/views/shared/_app_layout.blade.php index ba8c52c0..0ad04930 100644 --- a/resources/views/shared/_app_layout.blade.php +++ b/resources/views/shared/_app_layout.blade.php @@ -66,9 +66,7 @@