Skip to content

Commit

Permalink
Add ID to the allowed sort fields in api/Users. (snipe#5929)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeltzer authored and snipe committed Jul 23, 2018
1 parent 82194ce commit 3bc4321
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function index(Request $request)
'assets','accessories', 'consumables','licenses','groups','activated','created_at',
'two_factor_enrolled','two_factor_optin','last_login', 'assets_count', 'licenses_count',
'consumables_count', 'accessories_count', 'phone', 'address', 'city', 'state',
'country', 'zip'
'country', 'zip', 'id'
];

$sort = in_array($request->get('sort'), $allowed_columns) ? $request->get('sort') : 'first_name';
Expand Down

0 comments on commit 3bc4321

Please sign in to comment.