Make role name validation case insensitive

Role names are not case sensitive,
so need to convert the name to lowercase and make a judgement.

Change-Id: I389d264004d7cd3adce1784a3a9fcf89f994fcdf
Closes-Bug: #1821679
This commit is contained in:
pengyuesheng
2019-03-26 14:09:29 +08:00
committed by Dmitriy Chubinidze
parent a95d703c98
commit b2dd0fe5d5

View File

@@ -61,7 +61,7 @@
},
$validators: {
rolesExists: function (name) {
return (roles.indexOf(name) === -1);
return (roles.indexOf(name.toLowerCase()) === -1);
}
}
}
@@ -118,7 +118,7 @@
}
function getName(item) {
return item.name;
return item.name.toLowerCase();
}
}