1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-22 17:12:30 +01:00

Fix inability to set user as non-admin, closes #414

This commit is contained in:
Dane Everitt 2017-05-01 17:05:30 -04:00
parent 43df6533b0
commit 4eaf858684
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
2 changed files with 8 additions and 4 deletions

View File

@ -10,6 +10,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
* `[beta.2.1]` — Fixes a bug causing login issues and password reset failures when reCAPTCHA is enabled.
* Fixes remote timing attack vulnerability due to hmac comparsion in API middleware.
* `[beta.2.1]` — Fixes bug requiring docker image field to be filled out when adding a service option.
* `[beta.2.1]` — Fixes inability to mark a user as a non-admin once they were assigned the role.
### Added
* Added new scripts for service options that allows installation of software in a privileged Docker container on the node prior to marking a server as installed.

View File

@ -143,10 +143,13 @@ class UserController extends Controller
{
try {
$repo = new UserRepository;
$user = $repo->update($id, $request->intersect([
$user = $repo->update($id, array_merge(
$request->only('root_admin'),
$request->intersect([
'email', 'password', 'name_first',
'name_last', 'username', 'root_admin',
]));
'name_last', 'username',
])
));
Alert::success('User account was successfully updated.')->flash();
} catch (DisplayValidationException $ex) {
return redirect()->route('admin.users.view', $id)->withErrors(json_decode($ex->getMessage()));