snipe-it/routes/web/users.php

157 lines
3.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 App\Http\Controllers\Users\UserFilesController;
2021-06-10 13:17:14 -07:00
use Illuminate\Support\Facades\Route;
2022-07-02 11:28:17 -07:00
// User Management
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('users.clone.show');
Route::post(
'{userId}/clone',
[
Users\UsersController::class,
'postCreate'
]
)->name('users.clone.store');
Route::post(
'{userId}/restore',
[
Users\UsersController::class,
'getRestore'
]
)->name('users.restore.store');
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');
2016-12-15 20:52:39 -08:00
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');
2016-12-15 20:52:39 -08:00
Route::post(
'{userId}/email',
[
Users\UsersController::class,
'emailAssetList'
]
)->name('users.email');
2016-12-15 20:52:39 -08:00
Route::post(
'bulkedit',
[
Users\BulkUsersController::class,
'edit'
2016-12-15 20:52:39 -08:00
]
)->name('users/bulkedit');
Route::post(
'merge',
[
Users\BulkUsersController::class,
'merge'
]
)->name('users.merge.save');
2016-12-15 20:52:39 -08:00
Route::post(
'bulksave',
[
Users\BulkUsersController::class,
'destroy'
2016-12-15 20:52:39 -08:00
]
)->name('users/bulksave');
Route::post(
'bulkeditsave',
[
Users\BulkUsersController::class,
'update'
]
)->name('users/bulkeditsave');
// pulling this out of the resource because I need route model binding in the request
Route::patch('/{user}', [Users\UsersController::class, 'update'])->name('users.update');
Route::put('/{user}', [Users\UsersController::class, 'update'])->name('users.put-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'],
'except' => ['update']
]);