2016-12-15 20:52:39 -08:00
|
|
|
<?php
|
|
|
|
|
2021-06-10 13:17:14 -07:00
|
|
|
use App\Http\Controllers\Users;
|
2021-11-15 20:26:07 -08:00
|
|
|
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
|
2021-06-12 01:35:29 -07:00
|
|
|
|
2021-06-10 13:15:52 -07:00
|
|
|
Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () {
|
2021-06-12 01:35:29 -07:00
|
|
|
|
|
|
|
Route::get(
|
|
|
|
'ldap',
|
|
|
|
[
|
|
|
|
Users\LDAPImportController::class,
|
|
|
|
'create'
|
|
|
|
]
|
|
|
|
)->name('ldap/user');
|
2017-12-05 01:55:24 -08:00
|
|
|
|
2021-05-26 15:32:23 -07:00
|
|
|
Route::post(
|
2021-06-12 01:35:29 -07:00
|
|
|
'ldap',
|
2021-05-26 15:32:23 -07:00
|
|
|
[
|
2021-06-12 01:35:29 -07:00
|
|
|
Users\LDAPImportController::class,
|
|
|
|
'store'
|
2021-05-26 15:32:23 -07:00
|
|
|
]
|
|
|
|
);
|
|
|
|
|
2017-12-05 01:55:24 -08:00
|
|
|
Route::get(
|
2021-06-12 01:35:29 -07:00
|
|
|
'export',
|
|
|
|
[
|
|
|
|
Users\UsersController::class,
|
|
|
|
'getExportUserCsv'
|
|
|
|
]
|
|
|
|
)->name('users.export');
|
|
|
|
|
|
|
|
Route::get(
|
|
|
|
'{userId}/clone',
|
|
|
|
[
|
|
|
|
Users\UsersController::class,
|
|
|
|
'getClone'
|
|
|
|
]
|
2022-08-01 16:13:30 -07:00
|
|
|
)->name('users.clone.show');
|
2021-06-12 01:35:29 -07:00
|
|
|
|
|
|
|
Route::post(
|
|
|
|
'{userId}/clone',
|
|
|
|
[
|
|
|
|
Users\UsersController::class,
|
|
|
|
'postCreate'
|
|
|
|
]
|
2022-08-01 16:13:30 -07:00
|
|
|
)->name('users.clone.store');
|
2021-06-12 01:35:29 -07:00
|
|
|
|
2022-07-02 11:27:16 -07:00
|
|
|
Route::post(
|
2021-06-12 01:35:29 -07:00
|
|
|
'{userId}/restore',
|
|
|
|
[
|
|
|
|
Users\UsersController::class,
|
|
|
|
'getRestore'
|
|
|
|
]
|
2022-08-01 16:13:30 -07:00
|
|
|
)->name('users.restore.store');
|
2021-06-12 01:35:29 -07:00
|
|
|
|
|
|
|
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');
|
2017-12-05 01:55:24 -08:00
|
|
|
|
2016-12-15 20:52:39 -08:00
|
|
|
Route::get(
|
|
|
|
'{userId}/showfile/{fileId}',
|
2021-06-12 01:35:29 -07:00
|
|
|
[
|
|
|
|
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
|
|
|
|
2022-06-29 11:15:15 -07:00
|
|
|
Route::post(
|
|
|
|
'{userId}/email',
|
|
|
|
[
|
|
|
|
Users\UsersController::class,
|
|
|
|
'emailAssetList'
|
|
|
|
]
|
|
|
|
)->name('users.email');
|
|
|
|
|
2016-12-15 20:52:39 -08:00
|
|
|
Route::post(
|
|
|
|
'bulkedit',
|
|
|
|
[
|
2021-06-12 01:35:29 -07:00
|
|
|
Users\BulkUsersController::class,
|
|
|
|
'edit'
|
2016-12-15 20:52:39 -08:00
|
|
|
]
|
2021-06-12 01:35:29 -07:00
|
|
|
)->name('users/bulkedit');
|
|
|
|
|
2023-03-16 18:18:26 -07:00
|
|
|
Route::post(
|
|
|
|
'merge',
|
|
|
|
[
|
|
|
|
Users\BulkUsersController::class,
|
|
|
|
'merge'
|
|
|
|
]
|
|
|
|
)->name('users.merge.save');
|
|
|
|
|
2021-06-12 01:35:29 -07:00
|
|
|
|
2016-12-15 20:52:39 -08:00
|
|
|
Route::post(
|
|
|
|
'bulksave',
|
|
|
|
[
|
2021-06-12 01:35:29 -07:00
|
|
|
Users\BulkUsersController::class,
|
|
|
|
'destroy'
|
2016-12-15 20:52:39 -08:00
|
|
|
]
|
2021-06-12 01:35:29 -07:00
|
|
|
)->name('users/bulksave');
|
|
|
|
|
2017-03-10 20:07:44 -08:00
|
|
|
Route::post(
|
|
|
|
'bulkeditsave',
|
|
|
|
[
|
2021-06-12 01:35:29 -07:00
|
|
|
Users\BulkUsersController::class,
|
|
|
|
'update'
|
2017-03-10 20:07:44 -08:00
|
|
|
]
|
2021-06-12 01:35:29 -07:00
|
|
|
)->name('users/bulkeditsave');
|
|
|
|
|
|
|
|
|
2016-12-15 20:52:39 -08:00
|
|
|
});
|
|
|
|
|
2021-06-10 13:17:14 -07:00
|
|
|
Route::resource('users', Users\UsersController::class, [
|
2017-03-11 05:16:56 -08:00
|
|
|
'middleware' => ['auth'],
|
2021-06-10 13:15:52 -07:00
|
|
|
'parameters' => ['user' => 'user_id'],
|
2022-07-02 11:27:16 -07:00
|
|
|
]);
|