Skip to content

Commit

Permalink
Merge pull request #170 from amida-tech/feature/GREY-252
Browse files Browse the repository at this point in the history
GREY-252 org required field
  • Loading branch information
bolak authored Aug 12, 2016
2 parents 73224d6 + dd8d334 commit 377908f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions backend/app/controllers/organizations.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,9 @@ function* checkOrgData(req) {
throw new HttpError(400, 'Realm \'' + req.body.realm + '\' already exists');
}
} else {
if (!req.body.name) {
throw new HttpError(400, 'name field is required');
}
delete req.body.realm; // do not allow to edit realm in organization
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ angular.module('greyscale.tables')
field: 'realm',
show: true,
title: 'Realm',
dataReadOnly: 'edit'
dataReadOnly: 'edit',
dataRequired: true
}, {
field: 'name',
show: true,
sortable: 'name',
title: tns + 'NAME'
title: tns + 'NAME',
dataRequired: true
}, {
field: 'address',
show: true,
Expand Down

0 comments on commit 377908f

Please sign in to comment.