mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Fixes #3514 - removed debugging code that was forcing 404
This commit is contained in:
parent
6fbf45554b
commit
68e831d555
|
@ -489,40 +489,4 @@ Route::group(['prefix' => 'v1','namespace' => 'Api'], function () {
|
||||||
}); // Users group
|
}); // Users group
|
||||||
|
|
||||||
|
|
||||||
### DEBUG ROUTES ###
|
|
||||||
|
|
||||||
Route::group(['prefix' => 'me'], function () {
|
|
||||||
|
|
||||||
if (env('APP_ENV') == 'production') {
|
|
||||||
abort(404);
|
|
||||||
}
|
|
||||||
|
|
||||||
Route::get('/profile', function () {
|
|
||||||
return json_encode([
|
|
||||||
'name' => \Auth::user()->first_name . ' ' . \Auth::user()->last_name,
|
|
||||||
'email' => \Auth::user()->email,
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::get('/authenticated', function () {
|
|
||||||
return json_encode([
|
|
||||||
'authenticated' => \Auth::check()
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::get('/permissions/{scope}/{action}', function ($scope, $action) {
|
|
||||||
return json_encode([
|
|
||||||
'permission' => $scope . '.' . $action,
|
|
||||||
'authorized' => \Auth::user()->hasAccess($scope . '.' . $action),
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::get('/permissions', function () {
|
|
||||||
return json_encode([
|
|
||||||
'permissions' => Auth::user()->permissions
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue