This commit is contained in:
Jamie.Rees 2016-12-05 08:48:56 +00:00
commit f381f9765b
4 changed files with 74 additions and 15 deletions

View file

@ -74,6 +74,14 @@
}
}
var existingUsername = $scope.users.some(function (u) {
return u.username === $scope.user.username;
});
if (existingUsername) {
return generateNotify("A user with the username " + $scope.user.username + " already exists!", 'danger');
}
userManagementService.addUser($scope.user, $scope.selectedPermissions, $scope.selectedFeatures)
.then(function (data) {
if (data.message) {