diff --git a/lib/global-admin/addon/security/authentication/activedirectory/controller.js b/lib/global-admin/addon/security/authentication/activedirectory/controller.js index 6a7c1c55b..26e87bf6d 100644 --- a/lib/global-admin/addon/security/authentication/activedirectory/controller.js +++ b/lib/global-admin/addon/security/authentication/activedirectory/controller.js @@ -35,15 +35,16 @@ export default Controller.extend({ this.tlsChanged(); } }, + createDisabled: computed('username.length','password.length', function() { return !get(this, 'username.length') || !get(this, 'password.length'); }), - numUsers: computed('adConfig.allowedIdentities.@each.externalIdType','userType','groupType', function() { + numUsers: computed('adConfig.allowedPrincipalIds.[]','userType','groupType', function() { return ( get(this, 'adConfig.allowedPrincipalIds') || [] ).filter(principal => principal.includes(C.PROJECT.TYPE_ACTIVE_DIRECTORY_USER)).get('length'); }), - numGroups: computed('adConfig.allowedIdentities.@each.externalIdType','userType','groupType', function() { + numGroups: computed('adConfig.allowedPrincipalIds.[]','userType','groupType', function() { return ( get(this, 'adConfig.allowedPrincipalIds') || [] ).filter(principal => principal.includes(C.PROJECT.TYPE_ACTIVE_DIRECTORY_GROUP)).get('length'); }), diff --git a/lib/shared/addon/components/site-access/component.js b/lib/shared/addon/components/site-access/component.js index c46bb016f..fa8be5c19 100644 --- a/lib/shared/addon/components/site-access/component.js +++ b/lib/shared/addon/components/site-access/component.js @@ -33,7 +33,7 @@ export default Component.extend({ this.send('clearError'); set(this, 'saved', false); - get(this, 'model.allowedPrincipalIds').addObject(principal.id); + get(this, 'model.allowedPrincipalIds').pushObject(principal.id); }, removeAuthorized(id) { @@ -88,7 +88,7 @@ export default Component.extend({ let found = allowedPrincipals.filter(ident => get(me, 'id') === ident).length > 0; if ( !found ) { - allowedPrincipals.addObject(get(me, 'id')); + allowedPrincipals.pushObject(get(me, 'id')); } }