diff --git a/CHANGELOG.md b/CHANGELOG.md index 60dbb960e..a4335aa0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Enhancements -### Bug Fixes +### Bug Fixes +- Filter blank backend role before creating internal user ([#2330](https://github.com/opensearch-project/security-dashboards-plugin/pull/2330)) ### Refactoring diff --git a/public/apps/configuration/panels/internal-user-edit/internal-user-edit.tsx b/public/apps/configuration/panels/internal-user-edit/internal-user-edit.tsx index ce67d0c15..8d25a0595 100644 --- a/public/apps/configuration/panels/internal-user-edit/internal-user-edit.tsx +++ b/public/apps/configuration/panels/internal-user-edit/internal-user-edit.tsx @@ -116,7 +116,7 @@ export function InternalUserEdit(props: InternalUserEditDeps) { const validAttributes = attributes.filter((v: UserAttributeStateClass) => v.key !== ''); const updateObject: InternalUserUpdate = { - backend_roles: backendRoles, + backend_roles: backendRoles.filter((role) => role.trim() !== ''), attributes: unbuildAttributeState(validAttributes), };