- Roles null value acceptance bug in permissions
Change-Id: I46547949385c908a0289874131fcc28290bb5743
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
} else {
this.roleForm.value.permissions = this.roleForm.value.permissions.replace(/'/g, '"');
const rolePermission: {} = JSON.parse(this.roleForm.value.permissions);
- for (const key of Object.keys(rolePermission)) {
+ for (const key of Object.values(rolePermission)) {
// eslint-disable-next-line security/detect-object-injection
- if (typeof rolePermission[key] !== 'boolean') {
+ if (typeof key !== 'boolean' && key !== null) {
this.notifierService.notify('error', this.translateService.instant('PAGE.ROLES.ROLEKEYERROR', { roleKey: key }));
return false;
}