Fixed unselectable checkbox role form options

This commit is contained in:
Dan Brown 2023-02-19 16:03:50 +00:00
parent 950c02e996
commit 4176b598ce
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9

View file

@ -116,14 +116,8 @@ class RoleController extends Controller
'mfa_enforced' => ['string'],
]);
if (isset($data['permissions'])) {
$data['permissions'] = array_keys($data['permissions']);
}
if (isset($data['mfa_enforced'])) {
$data['mfa_enforced'] = $data['mfa_enforced'] === 'true';
}
$data['permissions'] = array_keys($data['permissions'] ?? []);
$data['mfa_enforced'] = ($data['mfa_enforced'] ?? 'false') === 'true';
$this->permissionsRepo->updateRole($id, $data);
return redirect('/settings/roles');