forked from Alex/Pterodactyl-Panel
Allow creating subuser with no permissions
This commit is contained in:
parent
96699b192e
commit
304d947536
@ -17,6 +17,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
|
||||
### Changed
|
||||
* Attempting to upload a folder via the web file manager will now display a warning telling the user to use SFTP.
|
||||
* Changing your account password will now log out all other sessions that currently exist for that user.
|
||||
* Subusers with no permissions selected can be created.
|
||||
|
||||
## v0.7.7 (Derelict Dermodactylus)
|
||||
### Fixed
|
||||
|
@ -157,7 +157,6 @@ class SubuserController extends Controller
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \Illuminate\Auth\Access\AuthorizationException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
* @throws \Pterodactyl\Exceptions\Service\Subuser\ServerSubuserExistsException
|
||||
@ -171,7 +170,7 @@ class SubuserController extends Controller
|
||||
$this->alert->success(trans('server.users.user_assigned'))->flash();
|
||||
|
||||
return redirect()->route('server.subusers.view', [
|
||||
'uuid' => $server->uuid,
|
||||
'uuid' => $server->uuidShort,
|
||||
'id' => $subuser->hashid,
|
||||
]);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class SubuserStoreFormRequest extends ServerFormRequest
|
||||
{
|
||||
return [
|
||||
'email' => 'required|email',
|
||||
'permissions' => 'present|array',
|
||||
'permissions' => 'sometimes|array',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -56,6 +56,8 @@ class PermissionCreationService
|
||||
}
|
||||
}
|
||||
|
||||
$this->repository->withoutFreshModel()->insert($insertPermissions);
|
||||
if (! empty($insertPermissions)) {
|
||||
$this->repository->withoutFreshModel()->insert($insertPermissions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ class SubuserControllerTest extends ControllerTestCase
|
||||
$response = $controller->store($this->request);
|
||||
$this->assertIsRedirectResponse($response);
|
||||
$this->assertRedirectRouteEquals('server.subusers.view', $response, [
|
||||
'uuid' => $server->uuid,
|
||||
'uuid' => $server->uuidShort,
|
||||
'id' => $subuser->hashid,
|
||||
]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user