snipe-it/routes/web/users.php
snipe aa8f1378c9 Merge remote-tracking branch 'origin/master' into develop
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	README.md
#	app/Http/Controllers/Accessories/AccessoriesController.php
#	app/Http/Controllers/Api/AssetMaintenancesController.php
#	app/Http/Controllers/Api/AssetModelsController.php
#	app/Http/Controllers/Api/AssetsController.php
#	app/Http/Controllers/Api/UsersController.php
#	app/Http/Controllers/AssetMaintenancesController.php
#	app/Http/Controllers/Assets/AssetFilesController.php
#	app/Http/Controllers/Assets/AssetsController.php
#	app/Http/Controllers/Assets/BulkAssetsController.php
#	app/Http/Controllers/Components/ComponentsController.php
#	app/Http/Controllers/Consumables/ConsumablesController.php
#	app/Http/Controllers/Licenses/LicenseFilesController.php
#	app/Http/Controllers/Licenses/LicensesController.php
#	app/Http/Controllers/Users/UserFilesController.php
#	app/Http/Transformers/AssetsTransformer.php
#	app/Http/Transformers/LicensesTransformer.php
#	app/Importer/UserImporter.php
#	app/Models/Asset.php
#	config/app.php
#	config/version.php
#	package-lock.json
#	public/js/build/app.js
#	public/js/dist/all.js
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
#	resources/lang/en/admin/users/message.php
#	resources/lang/is/button.php
#	resources/lang/ja/admin/kits/general.php
#	resources/lang/ro/admin/users/general.php
#	resources/lang/zh-HK/admin/depreciations/general.php
#	resources/lang/zh-HK/admin/models/general.php
#	resources/views/hardware/qr-view.blade.php
#	resources/views/hardware/view.blade.php
#	resources/views/partials/bootstrap-table.blade.php
#	resources/views/users/view.blade.php
#	routes/web.php
#	routes/web/hardware.php
#	routes/web/models.php
#	routes/web/users.php
2021-10-20 17:26:41 -07:00

146 lines
3.2 KiB
PHP

<?php
use App\Http\Controllers\Users;
use Illuminate\Support\Facades\Route;
// User Management
Route::post('{userId}/clone', [ 'uses' => 'Users\UsersController@postCreate' ]);
Route::post('{userId}/restore', [ 'as' => 'restore/user', 'uses' => 'Users\UsersController@getRestore' ]);
Route::get('{userId}/unsuspend', [ 'as' => 'unsuspend/user', 'uses' => 'Users\UsersController@getUnsuspend' ]);
Route::post('{userId}/upload', [ 'as' => 'upload/user', 'uses' => 'Users\UserFilesController@store' ]);
Route::delete(
'{userId}/deletefile/{fileId}',
[ 'as' => 'userfile.destroy', 'uses' => 'Users\UserFilesController@destroy' ]
);
Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () {
Route::get(
'ldap',
[
Users\LDAPImportController::class,
'create'
]
)->name('ldap/user');
Route::post(
'ldap',
[
Users\LDAPImportController::class,
'store'
]
);
Route::get(
'export',
[
Users\UsersController::class,
'getExportUserCsv'
]
)->name('users.export');
Route::get(
'{userId}/clone',
[
Users\UsersController::class,
'getClone'
]
)->name('clone/user');
Route::post(
'{userId}/clone',
[
Users\UsersController::class,
'postCreate'
]
)->name('clone/user');
Route::get(
'{userId}/restore',
[
Users\UsersController::class,
'getRestore'
]
)->name('restore/user');
Route::get(
'{userId}/unsuspend',
[
Users\UsersController::class,
'getUnsuspend'
]
)->name('unsuspend/user');
Route::post(
'{userId}/upload',
[
Users\UserFilesController::class,
'store'
]
)->name('upload/user');
Route::delete(
'{userId}/deletefile/{fileId}',
[
Users\UserFilesController::class,
'destroy'
]
)->name('userfile.destroy');
Route::get(
'{userId}/showfile/{fileId}',
[
Users\UserFilesController::class,
'show'
]
)->name('show/userfile');
Route::post(
'{userId}/password',
[
Users\UsersController::class,
'sendPasswordReset'
]
)->name('users.password');
Route::get(
'{userId}/print',
[
Users\UsersController::class,
'printInventory'
]
)->name('users.print');
Route::post(
'bulkedit',
[
Users\BulkUsersController::class,
'edit'
]
)->name('users/bulkedit');
Route::post(
'bulksave',
[
Users\BulkUsersController::class,
'destroy'
]
)->name('users/bulksave');
Route::post(
'bulkeditsave',
[
Users\BulkUsersController::class,
'update'
]
)->name('users/bulkeditsave');
});
Route::resource('users', Users\UsersController::class, [
'middleware' => ['auth'],
'parameters' => ['user' => 'user_id'],
]);