snipe-it/routes/web/users.php

66 lines
2.3 KiB
PHP
Raw Normal View History

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