diff --git a/backend/app/controllers/organizations.js b/backend/app/controllers/organizations.js index 1182cf66e..6f6997239 100644 --- a/backend/app/controllers/organizations.js +++ b/backend/app/controllers/organizations.js @@ -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 } diff --git a/client/app/greyscale.tables/scripts/services/greyscale-organizations.js b/client/app/greyscale.tables/scripts/services/greyscale-organizations.js index 4760a0864..b3372a1f0 100644 --- a/client/app/greyscale.tables/scripts/services/greyscale-organizations.js +++ b/client/app/greyscale.tables/scripts/services/greyscale-organizations.js @@ -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,