From 3cd5c27a4be76356ea0c533bb09c8c7aa668d061 Mon Sep 17 00:00:00 2001 From: Westly Wright Date: Tue, 6 Mar 2018 09:55:27 -0700 Subject: [PATCH 1/5] disable update properly --- .../project-member-row/component.js | 2 +- .../project-member-row/template.hbs | 2 +- yarn.lock | 39 +------------------ 3 files changed, 3 insertions(+), 40 deletions(-) diff --git a/lib/shared/addon/components/project-member-row/component.js b/lib/shared/addon/components/project-member-row/component.js index 2d4476769..c8ca7c792 100644 --- a/lib/shared/addon/components/project-member-row/component.js +++ b/lib/shared/addon/components/project-member-row/component.js @@ -62,6 +62,7 @@ export default Component.extend({ } if (member && member.principalId) { + set(this, 'noUpdate', true); get(this, 'globalStore').rawRequest({ url: `principals/${encodeURIComponent(get(this, 'member.principalId'))}`, method: 'GET', @@ -72,7 +73,6 @@ export default Component.extend({ if ( xhr.body && typeof xhr.body === 'object') { set(this, 'principal', set(this, 'external', xhr.body)); - set(this, 'noUpdate', true); this.principalChanged(); } return xhr; diff --git a/lib/shared/addon/components/project-member-row/template.hbs b/lib/shared/addon/components/project-member-row/template.hbs index 7ea18b65a..727b124d0 100644 --- a/lib/shared/addon/components/project-member-row/template.hbs +++ b/lib/shared/addon/components/project-member-row/template.hbs @@ -3,7 +3,7 @@ {{owner.displayName}} {{else}} {{!-- {{searchable-select content=userList value=member.memberId}} --}} - {{principal-search errors=(mut errors) principal=principal external=external}} + {{principal-search errors=(mut errors) principal=principal external=external readOnly=noUpdate}} {{/if}} diff --git a/yarn.lock b/yarn.lock index ddddc3ce9..3ec884cf8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1195,21 +1195,6 @@ broccoli-babel-transpiler@^5.6.1: rsvp "^3.5.0" workerpool "^2.2.1" -broccoli-babel-transpiler@^5.6.2: - version "5.7.4" - resolved "https://registry.yarnpkg.com/broccoli-babel-transpiler/-/broccoli-babel-transpiler-5.7.4.tgz#2b0611ce9e5d98b8d8d2b49ae1219af2f52767e3" - dependencies: - babel-core "^5.0.0" - broccoli-funnel "^1.0.0" - broccoli-merge-trees "^1.0.0" - broccoli-persistent-filter "^1.4.2" - clone "^0.2.0" - hash-for-dep "^1.0.2" - heimdalljs-logger "^0.1.7" - json-stable-stringify "^1.0.0" - rsvp "^3.5.0" - workerpool "^2.3.0" - broccoli-babel-transpiler@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/broccoli-babel-transpiler/-/broccoli-babel-transpiler-6.0.0.tgz#a52c5404bf36236849da503b011fd41fe64a00a2" @@ -2717,17 +2702,7 @@ ember-cli-app-version@^3.0.0: ember-cli-babel "^6.8.0" git-repo-version "0.4.1" -ember-cli-babel@^5.1.6, ember-cli-babel@^5.1.7, ember-cli-babel@^5.2.1, ember-cli-babel@^5.2.4: - version "5.2.4" - resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-5.2.4.tgz#5ce4f46b08ed6f6d21e878619fb689719d6e8e13" - dependencies: - broccoli-babel-transpiler "^5.6.2" - broccoli-funnel "^1.0.0" - clone "^2.0.0" - ember-cli-version-checker "^1.0.2" - resolve "^1.1.2" - -ember-cli-babel@^6.0.0, ember-cli-babel@^6.0.0-beta.4, ember-cli-babel@^6.0.0-beta.7, ember-cli-babel@^6.3.0, ember-cli-babel@^6.7.1, ember-cli-babel@^6.7.2, ember-cli-babel@^6.8.0, ember-cli-babel@^6.8.1, ember-cli-babel@^6.8.2: +ember-cli-babel@^5.1.6, ember-cli-babel@^5.1.7, ember-cli-babel@^5.2.1, ember-cli-babel@^5.2.4, ember-cli-babel@^6.0.0, ember-cli-babel@^6.0.0-beta.4, ember-cli-babel@^6.0.0-beta.7, ember-cli-babel@^6.3.0, ember-cli-babel@^6.7.1, ember-cli-babel@^6.7.2, ember-cli-babel@^6.8.0, ember-cli-babel@^6.8.1, ember-cli-babel@^6.8.2: version "6.8.2" resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-6.8.2.tgz#eac2785964f4743f4c815cd53c6288f00cc087d7" dependencies: @@ -6466,12 +6441,6 @@ resolve@1.3.2: dependencies: path-parse "^1.0.5" -resolve@^1.1.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" - dependencies: - path-parse "^1.0.5" - resolve@^1.1.3, resolve@^1.1.4, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.0, resolve@^1.3.3, resolve@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" @@ -7519,12 +7488,6 @@ workerpool@^2.2.1: dependencies: object-assign "4.1.1" -workerpool@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-2.3.0.tgz#86c5cbe946b55e7dc9d12b1936c8801a6e2d744d" - dependencies: - object-assign "4.1.1" - wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" From a64ad65db91c700e663b4744546039cc0c5fe833 Mon Sep 17 00:00:00 2001 From: Westly Wright Date: Tue, 6 Mar 2018 14:27:00 -0700 Subject: [PATCH 2/5] updates --- app/models/githubconfig.js | 53 ++++++++++++- .../authentication/github/controller.js | 2 +- .../security/authentication/github/route.js | 2 + .../addon/components/site-access/component.js | 75 +++++++++---------- .../addon/components/site-access/template.hbs | 17 +++-- lib/shared/addon/github/service.js | 14 +++- 6 files changed, 107 insertions(+), 56 deletions(-) diff --git a/app/models/githubconfig.js b/app/models/githubconfig.js index 837e92ec9..5967cd2ce 100644 --- a/app/models/githubconfig.js +++ b/app/models/githubconfig.js @@ -1,10 +1,55 @@ import Resource from 'ember-api-store/models/resource'; -import { arrayOfReferences } from 'ember-api-store/utils/denormalize'; +import { get, set, computed, observer } from '@ember/object'; +import { inject as service } from '@ember/service'; +import { allSettled } from 'rsvp'; var GithubConfig = Resource.extend({ - type: 'githubConfig', - // TODO WJW - technically this works but we can't get external principals because we currently have no `action=search` by ids for principals - allowedPrincipals: arrayOfReferences('allowedPrincipalIds', 'principal'), + type: 'githubConfig', + globalStore: service(), + _principals: null, + + init() { + this._super(...arguments); + + if (!get(this, '_principals')) { + set(this, '_principals', []); + } + + }, + + principalIdsChanged: observer('allowedPrincipalIds.[]', function() { + let aPIds = get(this, 'allowedPrincipalIds')||[]; + let promises = []; + let store = get(this, 'globalStore'); + const principals = []; + + if (get(aPIds, 'length')) { + aPIds.forEach(( aID ) => { + promises.push(store.rawRequest({ + url: `principals/${encodeURIComponent(aID)}`, + method: 'GET', + })); + }); + + allSettled(promises).then(( res ) => { + + let success = res.filterBy('state', 'fulfilled'); + + success.forEach( (promise) => { + let principal = get(promise, 'value.body'); + + principals.push(principal); + }); + + console.log('_principals', principals); + set(this, '_principals', principals); + }) + } + }), + + allowedPrincipals: computed('_principals.@each.{id}', function() { + return get(this, '_principals').sortBy('displayName') + }), }); export default GithubConfig; diff --git a/lib/global-admin/addon/security/authentication/github/controller.js b/lib/global-admin/addon/security/authentication/github/controller.js index 10a48132e..e49e53387 100644 --- a/lib/global-admin/addon/security/authentication/github/controller.js +++ b/lib/global-admin/addon/security/authentication/github/controller.js @@ -117,7 +117,7 @@ export default Controller.extend({ 'clientId' : (githubConfig.get('clientId')||'').trim(), 'clientSecret' : (githubConfig.get('clientSecret')||'').trim(), 'enabled' : false, // It should already be, but just in case.. - 'accessMode' : 'unrestricted', + 'accessMode' : 'restricted', 'tls': true, 'allowedPrincipalIds' : [], }); diff --git a/lib/global-admin/addon/security/authentication/github/route.js b/lib/global-admin/addon/security/authentication/github/route.js index 8c4d658b3..64fd6a6c1 100644 --- a/lib/global-admin/addon/security/authentication/github/route.js +++ b/lib/global-admin/addon/security/authentication/github/route.js @@ -10,6 +10,8 @@ export default Route.extend({ return hash({ githubConfig: gs.find('authconfig', 'github'), principals: gs.findAll('principal') + }).catch( e => { + return e; }) }, diff --git a/lib/shared/addon/components/site-access/component.js b/lib/shared/addon/components/site-access/component.js index a3c315034..8b0550710 100644 --- a/lib/shared/addon/components/site-access/component.js +++ b/lib/shared/addon/components/site-access/component.js @@ -3,44 +3,43 @@ import Component from '@ember/component'; import Errors from 'ui/utils/errors'; import layout from './template'; import { get, set, observer } from '@ember/object'; -import { on } from '@ember/object/evented'; export default Component.extend({ layout, - tagName: 'section', - classNames: ['well'], - settings: service(), - access: service(), - github: service(), + tagName: 'section', + classNames: ['well'], + settings: service(), + access: service(), + github: service(), - model: null, + model: null, individuals: 'siteAccess.users', - collection: 'siteAccess.groups', - principals: null, + collection: 'siteAccess.groups', + principals: null, - saved: true, - errors: null, + saved: true, + errors: null, showList: function() { - return get(this, 'copy.accessMode') !== 'unrestricted'; - }.property('copy.accessMode'), + return get(this, 'model.accessMode') !== 'unrestricted'; + }.property('model.accessMode'), actions: { - addAuthorized: function(id) { + addAuthorized: function(principalId) { this.send('clearError'); set(this, 'saved', false); - get(this, 'copy.allowedPrincipalIds').pushObject(id); + get(this, 'model.allowedPrincipalIds').addObject(principalId); }, removeAuthorized: function(id) { set(this, 'saved', false); - get(this, 'copy.allowedPrincipalIds').removeObject(id); + get(this, 'model.allowedPrincipalIds').removeObject(ident.id); }, save: function(btnCb) { this.send('clearError'); - if ( get(this, 'showList') && !get(this, 'copy.allowedPrincipalIds.length') ) + if ( get(this, 'showList') && !get(this, 'model.allowedPrincipalIds.length') ) { this.send('gotError', 'You must add at least one authorized entry'); btnCb(); @@ -49,10 +48,8 @@ export default Component.extend({ set(this, 'saved', false); - let copy = get(this, 'copy'); - copy.save().then(() => { - get(this, 'model').replaceWith(copy); - set(this, 'copy.allowedPrincipalIds', get(this, 'copy.allowedPrincipalIds').slice()); + let model = get(this, 'model'); + model.save().then(() => { set(this, 'saved', true); }).catch((err) => { this.send('gotError', err); @@ -72,32 +69,30 @@ export default Component.extend({ init() { this._super(...arguments); - set(this, 'copy', get(this, 'model').clone()); - set(this, 'copy.allowedPrincipalIds', (get(this, 'copy.allowedPrincipalIds')||[]).slice()); this.accessModeChanged(); }, - accessModeChanged: observer('copy.accessMode', function() { + accessModeChanged: observer('model.accessMode', function() { set(this, 'saved',false); - let identities = get(this, 'copy.allowedPrincipalIds'); // ['princ_id1://yada'] - if ( !identities ) + let allowedPrincipals = get(this, 'model.allowedPrincipalIds'); // ['princ_id1://yada'] + if ( !allowedPrincipals ) { - identities = []; - set(this, 'copy.allowedPrincipalIds', identities); + allowedPrincipals = []; + set(this, 'model.allowedPrincipalIds', allowedPrincipals); } - if ( get(this, 'copy.accessMode') !== 'unrestricted' ) - { - let me = get(this, 'access.me.principalIds'); - let found = identities.filter((ident) => { - return me.includes(ident); - }).length > 0; - if ( !found ) - { - // TODO? - identities = identities.concat(me).uniq(); - } - } + // if ( get(this, 'model.accessMode') !== 'unrestricted' ) + // { + // let me = get(this, 'access.me.principalIds')||[]; + // let found = allowedPrincipals.filter((ident) => { + // return me.includes(ident); + // }).length > 0; + // if ( found ) { + // } else { + // // TODO? + // allowedPrincipals = allowedPrincipals.concat(me).uniq(); + // } + // } }), }); diff --git a/lib/shared/addon/components/site-access/template.hbs b/lib/shared/addon/components/site-access/template.hbs index ab5f8dbcc..52658c95f 100644 --- a/lib/shared/addon/components/site-access/template.hbs +++ b/lib/shared/addon/components/site-access/template.hbs @@ -8,34 +8,35 @@
- +
- +
- +
{{#if showList}} - {{input-identity allowTeams=false action="addAuthorized" onError="gotError"}} + {{input-identity allowTeams=true action="addAuthorized" onError="gotError"}}
{{t 'siteAccess.listHeader' individuals=(t individuals) collection=(t collection)}}
    - {{#each copy.allowedPrincipals as |item|}} + {{#each model.allowedPrincipals as |item|}}
  • {{#identity-block principal=item}} {{/identity-block}}
  • + {{else}} +
  • + {{t 'siteAccess.noIdentity'}} +
  • {{/each}}
- {{#if (eq copy.allowedIdentities.length 0)}} - {{t 'siteAccess.noIdentity'}} - {{/if}} {{/if}}
diff --git a/lib/shared/addon/github/service.js b/lib/shared/addon/github/service.js index beb6c330d..969d8a11a 100644 --- a/lib/shared/addon/github/service.js +++ b/lib/shared/addon/github/service.js @@ -85,7 +85,7 @@ export default Service.extend({ }, finishTest(config, code, cb) { - let ghConfig = config.clone(); + let ghConfig = config; let out = { code: code, enabled: true, @@ -93,8 +93,16 @@ export default Service.extend({ }; return this.saveConfig(config, out).then(() => { - get(this, 'access').detect(); // Update the list of providers... - cb(); + return get(this, 'globalStore').find('principal', null, {filter: {me: true, provider: 'github'}}).then(( resp ) => { + let me = resp.find( (p) => { + return get(p, 'me') && get(p, 'provider') === 'github';// TODO filters do not work but craig knows + }); + out.githubConfig.allowedPrincipalIds.push(me.id); + return ghConfig.save().then(() => { + get(this, 'access').detect(); // Update the list of providers... + cb(); + }); + }); }).catch((err) => { cb(err); }); From a0c2157400a7ba354a9e943ebbef7bcb1d738508 Mon Sep 17 00:00:00 2001 From: Westly Wright Date: Tue, 6 Mar 2018 15:10:21 -0700 Subject: [PATCH 3/5] more principal search refactors --- app/models/githubconfig.js | 1 - .../addon/components/form-scoped-roles/component.js | 13 ++++++++++--- .../addon/components/form-scoped-roles/template.hbs | 2 +- .../addon/components/input-identity/component.js | 2 +- .../addon/components/input-identity/template.hbs | 2 -- .../addon/components/principal-search/component.js | 10 +--------- .../components/project-member-row/component.js | 11 +++++++++-- .../components/project-member-row/template.hbs | 13 ++++++++++--- .../addon/components/site-access/component.js | 4 ++-- 9 files changed, 34 insertions(+), 24 deletions(-) diff --git a/app/models/githubconfig.js b/app/models/githubconfig.js index 5967cd2ce..c78441ee9 100644 --- a/app/models/githubconfig.js +++ b/app/models/githubconfig.js @@ -41,7 +41,6 @@ var GithubConfig = Resource.extend({ principals.push(principal); }); - console.log('_principals', principals); set(this, '_principals', principals); }) } diff --git a/lib/shared/addon/components/form-scoped-roles/component.js b/lib/shared/addon/components/form-scoped-roles/component.js index a1df5aa32..f0cd6747c 100644 --- a/lib/shared/addon/components/form-scoped-roles/component.js +++ b/lib/shared/addon/components/form-scoped-roles/component.js @@ -1,3 +1,4 @@ +import Errors from 'ui/utils/errors'; import Component from '@ember/component' import { all as PromiseAll } from 'rsvp'; import { inject as service } from '@ember/service'; @@ -151,6 +152,12 @@ export default Component.extend(NewOrEdit,{ actions: { + gotError: function(err) { + set(this, 'errors', [Errors.stringify(err)]); + }, + addAuthorized: function(principal) { + set(this, 'principal', principal); + }, cancel() { this.sendAction('cancel'); }, @@ -163,10 +170,10 @@ export default Component.extend(NewOrEdit,{ let principal = get(this, 'principal'); if (principal) { - if (get(principal, 'type') === 'user') { - set(pr, 'userPrincipalId', get(principal, 'value')) + if (get(principal, 'principalType') === 'user') { + set(pr, 'userPrincipalId', get(principal, 'id')) } else if (get(principal, 'type') === 'group') { - set(pr, 'groupPrincipalId', get(principal, 'value')) + set(pr, 'groupPrincipalId', get(principal, 'id')) } } diff --git a/lib/shared/addon/components/form-scoped-roles/template.hbs b/lib/shared/addon/components/form-scoped-roles/template.hbs index 2962e764f..58a9ce799 100644 --- a/lib/shared/addon/components/form-scoped-roles/template.hbs +++ b/lib/shared/addon/components/form-scoped-roles/template.hbs @@ -1,7 +1,7 @@
- {{principal-search errors=(mut errors) principal=principal}} + {{input-identity allowTeams=true action="addAuthorized" onError="gotError"}}
diff --git a/lib/shared/addon/components/input-identity/component.js b/lib/shared/addon/components/input-identity/component.js index d982519f5..7eb2d5e2b 100644 --- a/lib/shared/addon/components/input-identity/component.js +++ b/lib/shared/addon/components/input-identity/component.js @@ -41,7 +41,7 @@ export default Component.extend({ // if (!get(this, 'globalStore').hasRecordFor(principal.type, principal.id)) { // get(this, 'globalStore')._add('principal', principal); // } - this.send('addObject', get(principal, 'id')); + this.send('addObject', principal); } diff --git a/lib/shared/addon/components/input-identity/template.hbs b/lib/shared/addon/components/input-identity/template.hbs index 8f433dc28..fed7da7d8 100644 --- a/lib/shared/addon/components/input-identity/template.hbs +++ b/lib/shared/addon/components/input-identity/template.hbs @@ -1,7 +1,5 @@
- {{!-- {{input type="text" value=addInput placeholder=(t (if (eq access.provider 'githubconfig') 'inputIdentity.placeholder.generic' 'inputIdentity.placeholder.github')) class="form-control"}} --}} - {{principal-search principal=addInput useLabel=true}}
diff --git a/lib/shared/addon/components/principal-search/component.js b/lib/shared/addon/components/principal-search/component.js index 0c6d41b62..ffad901e6 100644 --- a/lib/shared/addon/components/principal-search/component.js +++ b/lib/shared/addon/components/principal-search/component.js @@ -22,7 +22,7 @@ export default SearchableSelect.extend({ clientSideFiltering: false, filteredPrincipals: computed('_principals.@each.{id,state}', function() { - return get(this, '_principals').map(( principal ) =>{ + return ( get(this, '_principals') || [] ).map(( principal ) =>{ // console.log({label: get(principal, 'displayName') || get(principal, 'loginName') || get(principal, 'name'), value: get(principal, 'id'), provider: get(principal, 'provider'),}); return { label: get(principal, 'displayName') || get(principal, 'loginName') || get(principal, 'name'), @@ -33,14 +33,6 @@ export default SearchableSelect.extend({ }).sortBy('label'); }), - init() { - set(this, '_principals', get(this, 'globalStore').all('principal')); - get(this, 'globalStore').findAll('principal').then((principals) => { - set(this, '_ourPrincipals', principals); - }); - this._super(...arguments); - }, - externalChanged: on('init', observer('external', function(){ let principal = get(this, 'external'); diff --git a/lib/shared/addon/components/project-member-row/component.js b/lib/shared/addon/components/project-member-row/component.js index c8ca7c792..70da1882b 100644 --- a/lib/shared/addon/components/project-member-row/component.js +++ b/lib/shared/addon/components/project-member-row/component.js @@ -1,3 +1,4 @@ +import Errors from 'ui/utils/errors'; import Component from '@ember/component'; import layout from './template'; import { computed, get, set, setProperties, observer } from '@ember/object'; @@ -47,8 +48,8 @@ export default Component.extend({ let principal = (get(this, 'principal')); if (principal) { - set(this, 'member.memberId', get(principal, 'value')); - set(this, 'member.memberType', get(principal, 'type')); + set(this, 'member.memberId', get(principal, 'id')); + set(this, 'member.memberType', get(principal, 'principalType')); } }), @@ -89,6 +90,12 @@ export default Component.extend({ }, actions: { + gotError: function(err) { + set(this, 'errors', [Errors.stringify(err)]); + }, + addAuthorized: function(principal) { + set(this, 'principal', principal); + }, onSelect(selected) { if(selected.value === 'custom') { next(() => { diff --git a/lib/shared/addon/components/project-member-row/template.hbs b/lib/shared/addon/components/project-member-row/template.hbs index 727b124d0..1d6778c4a 100644 --- a/lib/shared/addon/components/project-member-row/template.hbs +++ b/lib/shared/addon/components/project-member-row/template.hbs @@ -2,15 +2,22 @@ {{#if owner}} {{owner.displayName}} {{else}} - {{!-- {{searchable-select content=userList value=member.memberId}} --}} - {{principal-search errors=(mut errors) principal=principal external=external readOnly=noUpdate}} + {{#if noUpdate}} + {{principal.displayName}} + {{else}} + {{input-identity allowTeams=true action="addAuthorized" onError="gotError"}} + {{/if}} {{/if}} {{#if owner}} {{t 'generic.owner'}} {{else}} - {{searchable-select change="onSelect" content=choices value=roleTemplateId readOnly=noUpdate}} + {{#if noUpdate}} + {{roleTemplateId}} + {{else}} + {{searchable-select change="onSelect" content=choices value=roleTemplateId readOnly=noUpdate}} + {{/if}} {{/if}}   diff --git a/lib/shared/addon/components/site-access/component.js b/lib/shared/addon/components/site-access/component.js index 8b0550710..56291784f 100644 --- a/lib/shared/addon/components/site-access/component.js +++ b/lib/shared/addon/components/site-access/component.js @@ -25,10 +25,10 @@ export default Component.extend({ }.property('model.accessMode'), actions: { - addAuthorized: function(principalId) { + addAuthorized: function(principal) { this.send('clearError'); set(this, 'saved', false); - get(this, 'model.allowedPrincipalIds').addObject(principalId); + get(this, 'model.allowedPrincipalIds').addObject(principal.id); }, removeAuthorized: function(id) { From fd2e426a0c93d454e70e1d5cee25f54614d68e4a Mon Sep 17 00:00:00 2001 From: Westly Wright Date: Tue, 6 Mar 2018 16:10:31 -0700 Subject: [PATCH 4/5] more fixes for principals --- app/styles/components/_searchable-select.scss | 15 ++++++++------- .../components/form-scoped-roles/template.hbs | 8 ++++---- .../addon/components/input-identity/template.hbs | 7 +------ .../components/principal-search/component.js | 5 ++++- .../components/searchable-select/component.js | 3 ++- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app/styles/components/_searchable-select.scss b/app/styles/components/_searchable-select.scss index 5f7eb5e41..b7807aee2 100644 --- a/app/styles/components/_searchable-select.scss +++ b/app/styles/components/_searchable-select.scss @@ -12,16 +12,17 @@ background-position: calc(100% - 10px) center; } - .input-search { - @extend .input-arrow; - &:hover{ - @extend .input-arrow; - } - &:focus{ + &.show-dropdown-arrow { + .input-search { @extend .input-arrow; + &:hover{ + @extend .input-arrow; + } + &:focus{ + @extend .input-arrow; + } } } - .searchable-option-active { background: $link-hover-color; color: white; diff --git a/lib/shared/addon/components/form-scoped-roles/template.hbs b/lib/shared/addon/components/form-scoped-roles/template.hbs index 58a9ce799..f80406d25 100644 --- a/lib/shared/addon/components/form-scoped-roles/template.hbs +++ b/lib/shared/addon/components/form-scoped-roles/template.hbs @@ -15,14 +15,14 @@ }}
{{#each userRoles as |role| }} diff --git a/lib/shared/addon/components/input-identity/template.hbs b/lib/shared/addon/components/input-identity/template.hbs index fed7da7d8..eed9a5af8 100644 --- a/lib/shared/addon/components/input-identity/template.hbs +++ b/lib/shared/addon/components/input-identity/template.hbs @@ -1,13 +1,8 @@
- {{principal-search principal=addInput useLabel=true}} + {{principal-search principal=addInput useLabel=true add="add"}}
- {{#if checking}} - - {{else}} - - {{/if}} {{#if showDropdown}}