mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixed routes that didn’t have auth requirement
This commit is contained in:
parent
b51b51b949
commit
793d9e9250
|
@ -1,33 +1,33 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
Route::group(['middleware' => 'auth'], function () {
|
||||
/*
|
||||
* Companies
|
||||
*/
|
||||
Route::resource('companies', 'CompaniesController', [
|
||||
'parameters' => ['company' => 'company_id']
|
||||
'parameters' => ['company' => 'company_id']
|
||||
]);
|
||||
|
||||
/*
|
||||
* Categories
|
||||
*/
|
||||
Route::resource('categories', 'CategoriesController', [
|
||||
'parameters' => ['category' => 'category_id']
|
||||
'parameters' => ['category' => 'category_id']
|
||||
]);
|
||||
|
||||
/*
|
||||
* Locations
|
||||
*/
|
||||
Route::resource('locations', 'LocationsController', [
|
||||
'parameters' => ['location' => 'location_id']
|
||||
'parameters' => ['location' => 'location_id']
|
||||
]);
|
||||
|
||||
/*
|
||||
* Manufacturers
|
||||
*/
|
||||
Route::resource('manufacturers', 'ManufacturersController', [
|
||||
'parameters' => ['manufacturer' => 'manufacturers_id']
|
||||
'parameters' => ['manufacturer' => 'manufacturers_id']
|
||||
]);
|
||||
|
||||
/*
|
||||
|
@ -59,6 +59,9 @@ Route::resource('components', 'ComponentsController', [
|
|||
'parameters' => ['component' => 'component_id']
|
||||
]);
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -92,7 +95,7 @@ Route::group(['middleware' => 'auth'], function () {
|
|||
|
|
||||
*/
|
||||
|
||||
Route::group([ 'prefix' => 'admin','middleware' => ['web','auth']], function () {
|
||||
Route::group([ 'prefix' => 'admin','middleware' => ['auth']], function () {
|
||||
|
||||
Route::get('requests',
|
||||
// foreach( CheckoutRequest::with('user')->get() as $requestedItem) {
|
||||
|
@ -155,7 +158,7 @@ Route::group([ 'prefix' => 'admin','middleware' => ['web','auth']], function ()
|
|||
});
|
||||
|
||||
# Group Management
|
||||
Route::group([ 'prefix' => 'groups', 'middleware' => ['web','auth','authorize:superadmin'] ], function () {
|
||||
Route::group([ 'prefix' => 'groups', 'middleware' => ['auth'] ], function () {
|
||||
|
||||
Route::get('/', [ 'as' => 'groups.index', 'uses' => 'GroupsController@getIndex' ]);
|
||||
Route::get('create', [ 'as' => 'groups.create', 'uses' => 'GroupsController@getCreate']);
|
||||
|
@ -175,7 +178,7 @@ Route::group([ 'prefix' => 'groups', 'middleware' => ['web','auth','authorize:su
|
|||
|
|
||||
|
|
||||
*/
|
||||
Route::group([ 'prefix' => 'account', 'middleware' => ['web', 'auth']], function () {
|
||||
Route::group([ 'prefix' => 'account', 'middleware' => ['auth']], function () {
|
||||
|
||||
# Profile
|
||||
Route::get('profile', [ 'as' => 'profile', 'uses' => 'ProfileController@getIndex' ]);
|
||||
|
@ -216,7 +219,7 @@ Route::group([ 'prefix' => 'account', 'middleware' => ['web', 'auth']], function
|
|||
});
|
||||
|
||||
|
||||
Route::group(['middleware' => ['web','auth','authorize:reports.view']], function () {
|
||||
Route::group(['middleware' => ['auth']], function () {
|
||||
|
||||
Route::get(
|
||||
'reports/depreciation',
|
||||
|
@ -369,7 +372,7 @@ Route::get(
|
|||
'/',
|
||||
[
|
||||
'as' => 'home',
|
||||
'middleware' => ['web', 'auth'],
|
||||
'middleware' => ['auth'],
|
||||
'uses' => 'DashboardController@getIndex' ]
|
||||
);
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/*
|
||||
* Accessories
|
||||
*/
|
||||
Route::group([ 'prefix' => 'accessories', ], function () {
|
||||
Route::group([ 'prefix' => 'accessories', 'middleware' => ['auth']], function () {
|
||||
|
||||
Route::get(
|
||||
'{accessoryID}/checkout',
|
||||
|
@ -26,5 +26,6 @@ Route::group([ 'prefix' => 'accessories', ], function () {
|
|||
});
|
||||
|
||||
Route::resource('accessories', 'AccessoriesController', [
|
||||
'middleware' => ['auth'],
|
||||
'parameters' => ['accessory' => 'accessory_id']
|
||||
]);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
# Components
|
||||
Route::group([ 'prefix' => 'components' ], function () {
|
||||
Route::group([ 'prefix' => 'components','middleware' => ['auth'] ], function () {
|
||||
|
||||
Route::get(
|
||||
'{componentID}/checkout',
|
||||
|
@ -17,5 +17,6 @@ Route::group([ 'prefix' => 'components' ], function () {
|
|||
});
|
||||
|
||||
Route::resource('components', 'ComponentsController', [
|
||||
'middleware' => ['auth'],
|
||||
'parameters' => ['component' => 'component_id']
|
||||
]);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
|
||||
# Consumables
|
||||
Route::group([ 'prefix' => 'consumables', 'middleware'=>'authorize:consumables.view' ], function () {
|
||||
Route::group([ 'prefix' => 'consumables', 'middleware' => ['auth']], function () {
|
||||
Route::get(
|
||||
'{consumableID}/checkout',
|
||||
[ 'as' => 'checkout/consumable','uses' => 'ConsumablesController@getCheckout' ]
|
||||
|
@ -14,5 +14,6 @@
|
|||
});
|
||||
|
||||
Route::resource('consumables', 'ConsumablesController', [
|
||||
'middleware' => ['auth'],
|
||||
'parameters' => ['consumable' => 'consumable_id']
|
||||
]);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
|
||||
Route::group([ 'prefix' => 'fields' ], function () {
|
||||
Route::group([ 'prefix' => 'fields','middleware' => ['auth'] ], function () {
|
||||
|
||||
Route::get('{field_id}/fieldset/{fieldset_id}/disassociate',
|
||||
['uses' => 'CustomFieldsController@deleteFieldFromFieldset',
|
||||
|
@ -23,5 +23,6 @@ Route::group([ 'prefix' => 'fields' ], function () {
|
|||
});
|
||||
|
||||
Route::resource('fields', 'CustomFieldsController', [
|
||||
'middleware' => ['auth'],
|
||||
'parameters' => ['field' => 'field_id', 'fieldset' => 'fieldset_id']
|
||||
]);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
Route::group(
|
||||
['prefix' => 'hardware',
|
||||
'middleware' => ['web','auth']],
|
||||
'middleware' => ['auth']],
|
||||
function () {
|
||||
|
||||
# Asset Maintenances
|
||||
|
@ -127,5 +127,6 @@ Route::group(
|
|||
|
||||
|
||||
Route::resource('hardware', 'AssetsController', [
|
||||
'middleware' => ['auth'],
|
||||
'parameters' => ['asset' => 'asset_id']
|
||||
]);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
|
||||
# Licenses
|
||||
Route::group([ 'prefix' => 'licenses' ], function () {
|
||||
Route::group([ 'prefix' => 'licenses', 'middleware' => ['auth'] ], function () {
|
||||
|
||||
Route::get('{licenseId}/clone', [ 'as' => 'clone/license', 'uses' => 'LicensesController@getClone' ]);
|
||||
Route::post('{licenseId}/clone', [ 'as' => 'clone/license', 'uses' => 'LicensesController@postCreate' ]);
|
||||
|
@ -44,5 +44,6 @@ Route::group([ 'prefix' => 'licenses' ], function () {
|
|||
});
|
||||
|
||||
Route::resource('licenses', 'LicensesController', [
|
||||
'middleware' => ['auth'],
|
||||
'parameters' => ['license' => 'license_id']
|
||||
]);
|
||||
|
|
|
@ -11,5 +11,6 @@ Route::group([ 'prefix' => 'models', 'middleware' => ['auth'] ], function () {
|
|||
});
|
||||
|
||||
Route::resource('models', 'AssetModelsController', [
|
||||
'middleware' => ['auth'],
|
||||
'parameters' => ['model' => 'model_id']
|
||||
]);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
# User Management
|
||||
Route::group([ 'prefix' => 'users', 'middleware' => ['web','auth']], function () {
|
||||
Route::group([ 'prefix' => 'users', 'middleware' => ['auth']], function () {
|
||||
|
||||
Route::get('ldap', ['as' => 'ldap/user', 'uses' => 'UsersController@getLDAP' ]);
|
||||
Route::post('ldap', 'UsersController@postLDAP');
|
||||
|
@ -48,5 +48,6 @@ Route::group([ 'prefix' => 'users', 'middleware' => ['web','auth']], function ()
|
|||
});
|
||||
|
||||
Route::resource('users', 'UsersController', [
|
||||
'middleware' => ['auth'],
|
||||
'parameters' => ['user' => 'user_id']
|
||||
]);
|
||||
|
|
Loading…
Reference in a new issue