2016-12-15 20:52:39 -08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
# User Management
|
2017-03-11 05:16:56 -08:00
|
|
|
Route::group([ 'prefix' => 'users', 'middleware' => ['auth']], function () {
|
2016-12-15 20:52:39 -08:00
|
|
|
|
2018-07-24 19:35:26 -07:00
|
|
|
Route::get('ldap', ['as' => 'ldap/user', 'uses' => 'Users\LDAPImportController@create' ]);
|
|
|
|
Route::post('ldap', 'Users\LDAPImportController@store');
|
|
|
|
Route::get('export', [ 'as' => 'users.export', 'uses' => 'Users\UsersController@getExportUserCsv' ]);
|
|
|
|
Route::get('{userId}/clone', [ 'as' => 'clone/user', 'uses' => 'Users\UsersController@getClone' ]);
|
|
|
|
Route::post('{userId}/clone', [ 'uses' => 'Users\UsersController@postCreate' ]);
|
|
|
|
Route::get('{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' ]);
|
2017-09-29 01:48:16 -07:00
|
|
|
Route::delete(
|
2016-12-15 20:52:39 -08:00
|
|
|
'{userId}/deletefile/{fileId}',
|
2018-07-24 19:35:26 -07:00
|
|
|
[ 'as' => 'userfile.destroy', 'uses' => 'Users\UserFilesController@destroy' ]
|
2016-12-15 20:52:39 -08:00
|
|
|
);
|
2017-12-05 01:55:24 -08:00
|
|
|
|
|
|
|
Route::get(
|
|
|
|
'{userId}/print',
|
2018-07-24 19:35:26 -07:00
|
|
|
[ 'as' => 'users.print', 'uses' => 'Users\UsersController@printInventory' ]
|
2017-12-05 01:55:24 -08:00
|
|
|
);
|
|
|
|
|
|
|
|
|
2016-12-15 20:52:39 -08:00
|
|
|
Route::get(
|
|
|
|
'{userId}/showfile/{fileId}',
|
2018-07-24 19:35:26 -07:00
|
|
|
[ 'as' => 'show/userfile', 'uses' => 'Users\UserFilesController@show' ]
|
2016-12-15 20:52:39 -08:00
|
|
|
);
|
|
|
|
|
|
|
|
Route::post(
|
|
|
|
'bulkedit',
|
|
|
|
[
|
|
|
|
'as' => 'users/bulkedit',
|
2018-07-24 19:35:26 -07:00
|
|
|
'uses' => 'Users\BulkUsersController@edit',
|
2016-12-15 20:52:39 -08:00
|
|
|
]
|
|
|
|
);
|
|
|
|
Route::post(
|
|
|
|
'bulksave',
|
|
|
|
[
|
|
|
|
'as' => 'users/bulksave',
|
2018-07-24 19:35:26 -07:00
|
|
|
'uses' => 'Users\BulkUsersController@destroy',
|
2016-12-15 20:52:39 -08:00
|
|
|
]
|
|
|
|
);
|
2017-03-10 20:07:44 -08:00
|
|
|
Route::post(
|
|
|
|
'bulkeditsave',
|
|
|
|
[
|
|
|
|
'as' => 'users/bulkeditsave',
|
2018-07-24 19:35:26 -07:00
|
|
|
'uses' => 'Users\BulkUsersController@update',
|
2017-03-10 20:07:44 -08:00
|
|
|
]
|
|
|
|
);
|
2016-12-15 20:52:39 -08:00
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2018-07-24 19:35:26 -07:00
|
|
|
Route::resource('users', 'Users\UsersController', [
|
2017-03-11 05:16:56 -08:00
|
|
|
'middleware' => ['auth'],
|
2016-12-15 20:52:39 -08:00
|
|
|
'parameters' => ['user' => 'user_id']
|
|
|
|
]);
|