mirror of https://github.com/rancher/ui.git
Bug fix for ad auth header and add kvo compliant array modifiers
rancher/rancher#12378
This commit is contained in:
parent
59258216c8
commit
10beda279e
|
|
@ -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');
|
||||
}),
|
||||
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue