snipe-it/routes/web/users.php

69 lines
2.1 KiB
PHP
Raw Normal View History

2016-12-15 20:52:39 -08:00
<?php
# User Management
Route::group([ 'prefix' => 'users', 'middleware' => ['auth']], function () {
2016-12-15 20:52:39 -08: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' ]);
Route::delete(
2016-12-15 20:52:39 -08:00
'{userId}/deletefile/{fileId}',
[ 'as' => 'userfile.destroy', 'uses' => 'Users\UserFilesController@destroy' ]
2016-12-15 20:52:39 -08:00
);
Route::post(
'{userId}/password',
[
'as' => 'users.password',
'uses' => 'Users\UsersController@sendPasswordReset',
]
);
Route::get(
'{userId}/print',
[ 'as' => 'users.print', 'uses' => 'Users\UsersController@printInventory' ]
);
2016-12-15 20:52:39 -08:00
Route::get(
'{userId}/showfile/{fileId}',
[ 'as' => 'show/userfile', 'uses' => 'Users\UserFilesController@show' ]
2016-12-15 20:52:39 -08:00
);
Route::post(
'bulkedit',
[
'as' => 'users/bulkedit',
'uses' => 'Users\BulkUsersController@edit',
2016-12-15 20:52:39 -08:00
]
);
Route::post(
'bulksave',
[
'as' => 'users/bulksave',
'uses' => 'Users\BulkUsersController@destroy',
2016-12-15 20:52:39 -08:00
]
);
Route::post(
'bulkeditsave',
[
'as' => 'users/bulkeditsave',
'uses' => 'Users\BulkUsersController@update',
]
);
2016-12-15 20:52:39 -08:00
});
Route::resource('users', 'Users\UsersController', [
'middleware' => ['auth'],
2016-12-15 20:52:39 -08:00
'parameters' => ['user' => 'user_id']
]);