diff --git a/addons/api/addon/models/auth-method.js b/addons/api/addon/models/auth-method.js index 8e6c4f198..f0832cc91 100644 --- a/addons/api/addon/models/auth-method.js +++ b/addons/api/addon/models/auth-method.js @@ -61,6 +61,8 @@ export default class AuthMethodModel extends GeneratedAuthMethodModel { */ @equal('is_primary', true) isPrimary; + options = options; + /** * @type {boolean} */ diff --git a/addons/api/mirage/config.js b/addons/api/mirage/config.js index b866dcae2..759eb63c3 100644 --- a/addons/api/mirage/config.js +++ b/addons/api/mirage/config.js @@ -536,9 +536,10 @@ export default function () { return managedGroups.where({ authMethodId }); } ); - this.get('/managed-groups/:id'); - this.del('/managed-groups/:id'); this.post('/managed-groups'); + this.get('/managed-groups/:id'); + this.patch('/managed-groups/:id'); + this.del('/managed-groups/:id'); /* Uncomment the following line and the Response import above * Then change the response code to simulate error responses. diff --git a/addons/rose/addon/components/rose/form/radio/radio-card/tile/index.js b/addons/rose/addon/components/rose/form/radio/card/tile/index.js similarity index 56% rename from addons/rose/addon/components/rose/form/radio/radio-card/tile/index.js rename to addons/rose/addon/components/rose/form/radio/card/tile/index.js index c670c00be..10546dd73 100644 --- a/addons/rose/addon/components/rose/form/radio/radio-card/tile/index.js +++ b/addons/rose/addon/components/rose/form/radio/card/tile/index.js @@ -1,6 +1,6 @@ import RoseFormRadioRadioComponent from '../../radio'; -export default class RoseFormRadioRadioCardComponent extends RoseFormRadioRadioComponent { +export default class RoseFormRadioCardComponent extends RoseFormRadioRadioComponent { // =attributes className = 'rose-form-radio-card-tile'; diff --git a/addons/rose/addon/components/rose/form/radio/radio-card/tile/index.stories.mdx b/addons/rose/addon/components/rose/form/radio/card/tile/index.stories.mdx similarity index 88% rename from addons/rose/addon/components/rose/form/radio/radio-card/tile/index.stories.mdx rename to addons/rose/addon/components/rose/form/radio/card/tile/index.stories.mdx index cd22b4f24..b45073e6e 100644 --- a/addons/rose/addon/components/rose/form/radio/radio-card/tile/index.stories.mdx +++ b/addons/rose/addon/components/rose/form/radio/card/tile/index.stories.mdx @@ -2,14 +2,14 @@ import { Meta, Story, Preview } from '@storybook/addon-docs/blocks'; import { hbs } from 'ember-cli-htmlbars'; import { text, boolean, select } from '@storybook/addon-knobs'; - + # Form RadioCard field in tile format Renders a form radioCard field in a tile format. ```htmlbars - {{ template: hbs` - + # Form Radiofield in a wide format Renders a form radiofield in a Wide format. ```htmlbars - {{ template: hbs` - + {{#if @helperText}} + + {{@helperText}} + + {{/if}} {{yield}} diff --git a/addons/rose/addon/components/rose/form/radio/radio/index.stories.mdx b/addons/rose/addon/components/rose/form/radio/radio/index.stories.mdx index 63e873862..613952aff 100644 --- a/addons/rose/addon/components/rose/form/radio/radio/index.stories.mdx +++ b/addons/rose/addon/components/rose/form/radio/radio/index.stories.mdx @@ -29,12 +29,14 @@ Renders a form radiofield. @selectedValue={{selectedValue}} @disabled={{disabled}} @icon={{icon}} + @helperText={{helperText}} /> `, context: { label: text('text', 'Radiofield'), error: boolean('error', false), value: text('value', 'value and selectedValue must match to select radiofield'), + helperText: text('helperText', 'Helper text'), selectedValue: text( 'selectedValue', 'value and selectedValue must match to select radiofield' @@ -63,6 +65,7 @@ Renders a form radiofield. @disabled={{false}} @changed={{fn}} @inline={{true}} + @helperText={{helperText}} /> ``` @@ -77,6 +80,7 @@ Renders a form radiofield. @disabled={{disabled}} @icon={{icon}} @inline={{inline}} + @helperText={{helperText}} /> `, context: { @@ -104,6 +110,7 @@ Renders a form radiofield. 'selectedValue', 'value and selectedValue must match to select radiofield' ), + helperText: text('helperText', 'Helper text'), disabled: boolean('disabled', false), icon: select( 'icon', diff --git a/addons/rose/addon/styles/rose/components/form/_radio.scss b/addons/rose/addon/styles/rose/components/form/_radio.scss index 3c94ac816..32be9a8c5 100644 --- a/addons/rose/addon/styles/rose/components/form/_radio.scss +++ b/addons/rose/addon/styles/rose/components/form/_radio.scss @@ -1,5 +1,6 @@ @use '../../variables/sizing'; @use '../../utilities/type'; +@use '../../variables/typography'; $radio-svg: ( 'default': @@ -34,9 +35,18 @@ $data-svg-prefix: 'data:image/svg+xml;utf-8,'; color: var(--ui-gray); .rose-form-radio-label { + display: flex; + align-items: center; + .rose-form-helper-text { + font-weight: normal; + margin-left: sizing.rems(xxs); + margin-bottom: 0; + } + @include type.type(s, semibold); color: currentColor; padding-left: sizing.rems(l); + padding-top: sizing.rems(xxxs); .rose-icon { margin-right: sizing.rems(xxs); diff --git a/addons/rose/addon/styles/rose/components/form/_radioCard.scss b/addons/rose/addon/styles/rose/components/form/_radioCard.scss index 4be2c5908..048390e9e 100644 --- a/addons/rose/addon/styles/rose/components/form/_radioCard.scss +++ b/addons/rose/addon/styles/rose/components/form/_radioCard.scss @@ -21,13 +21,13 @@ $size-xxxxs: sizing.rems(xxxxs); // 1 height: $l + $size-xxs; background-color: var(--ui-gray-subtler-5); width: 100%; - bottom: 1px; + bottom: 0; right: 0; } .rose-form-radio-label { font-style: normal; font-weight: bold; - font-size: 14px; + font-size: typography.font-size(s); color: var(--black); width: ($m) * 23; height: ($m) * 7.5; @@ -35,13 +35,20 @@ $size-xxxxs: sizing.rems(xxxxs); // 1 position: relative; text-align: left; word-break: break-all; - border: 1px solid #bac1cc; + border: $size-xxxxs solid #bac1cc; box-shadow: 0 $size-xxs $size-xxs rgba(var(--stark-components), var(--opacity-2)); - border-radius: 2px; - padding: 19px; + border-radius: $size-xxxs; + padding: $s $l; box-sizing: border-box; background-color: var(--white); + .rose-form-helper-text { + font-weight: normal; + } + .rose-icon { + padding-right: $size-xxs; + padding-left: $size-xxs; + } } .rose-form-radio-field { position: absolute; @@ -50,7 +57,7 @@ $size-xxxxs: sizing.rems(xxxxs); // 1 &:not(:disabled) { &:hover { ~ .rose-form-radio-label { - border: 1px solid var(--ui-gray); + border: $size-xxxxs solid var(--ui-gray); } } &:checked { @@ -58,14 +65,14 @@ $size-xxxxs: sizing.rems(xxxxs); // 1 .radio-card-overlay { background-color: var(--action-subtler-1h); } - border: 1px solid #1563ff; + border: $size-xxxxs solid #1563ff; } } } &:disabled { ~ .rose-form-radio-label { - border: 1px solid var(--ui-border-subtler-1); + border: $size-xxxxs solid var(--ui-border-subtler-1); background-color: var(--ui-gray-subtler-6); color: var(--ui-gray-starker-1); } @@ -73,22 +80,21 @@ $size-xxxxs: sizing.rems(xxxxs); // 1 } &.error { - color: var(--failure); .rose-form-radio-field { &:not(:disabled):not(:focus) { ~ .rose-form-radio-label { .radio-card-overlay { - background-color: var(--failure--subtler-1); + background-color: var(--failure-subtler-1); } - border: $xxxxs solid #c73445; + border-color: var(--failure); } &:checked { opacity: 0; ~ .rose-form-radio-label { &::after { position: absolute; - bottom: 5px; - right: 174px; + bottom: $size-xxs + $size-xxxs; + right: sizing.rems(m) * 10.9; display: block; width: $m; height: $m; @@ -121,28 +127,32 @@ $size-xxxxs: sizing.rems(xxxxs); // 1 height: $l + $size-xxs; background-color: var(--ui-gray-subtler-5); width: 100%; - bottom: 1px; + bottom: 0; right: 0; } .rose-form-radio-label { font-style: normal; font-weight: bold; - font-size: 14px; + font-size: typography.font-size(s); color: var(--black); width: ($m) * 15; height: ($m) * 9; - - display: block; + display: flex; + flex-direction: column; + align-items: center; position: relative; text-align: left; word-break: break-all; border: $xxxxs solid var(--ui-border); box-shadow: 0 $size-xxs $size-xxs rgba(var(--stark-components), var(--opacity-2)); - border-radius: 2px; - padding: 19px; + border-radius: $size-xxxs; + padding: $m $size-xxs; box-sizing: border-box; background-color: var(--white); + .rose-form-helper-text { + font-weight: normal; + } } .rose-form-radio-field { position: absolute; @@ -173,14 +183,13 @@ $size-xxxxs: sizing.rems(xxxxs); // 1 } &.error { - color: var(--failure); .rose-form-radio-field { &:not(:disabled):not(:focus) { ~ .rose-form-radio-label { .radio-card-overlay { - background-color: var(--failure--subtler-1); + background-color: var(--failure-subtler-1); } - border: $xxxxs solid #c73445; + border-color: var(--failure); } &:checked { opacity: 0; @@ -188,7 +197,7 @@ $size-xxxxs: sizing.rems(xxxxs); // 1 &::after { position: absolute; bottom: $size-xxs; - right: 109px; + right: sizing.rems(m) * 6.8; display: block; width: $m; height: $m; diff --git a/addons/rose/addon/styles/rose/variables/color/_css.scss b/addons/rose/addon/styles/rose/variables/color/_css.scss index be294f8ea..3e554cc07 100644 --- a/addons/rose/addon/styles/rose/variables/color/_css.scss +++ b/addons/rose/addon/styles/rose/variables/color/_css.scss @@ -49,7 +49,6 @@ --failure-subtler-1: #{color(red, 100)}; --failure: #{color(red)}; --failure-starker-1: #{color(red, 800)}; - --failure--subtler-1: #{color(red, 050)}; --success-subtler-2: #{color(green, 010)}; --success-subtler-1: #{color(green, 100)}; @@ -109,7 +108,6 @@ --failure-subtler-1: #{color(red, 800)}; --failure: #{color(red, 300)}; --failure-starker-1: #{color(red, 200)}; - --failure--subtler-1: #{color(red, 050)}; --success-subtler-2: #{color(green, 900)}; --success-subtler-1: #{color(green, 800)}; diff --git a/addons/rose/app/components/rose/form/radio/card/tile/index.js b/addons/rose/app/components/rose/form/radio/card/tile/index.js new file mode 100644 index 000000000..a050dcff9 --- /dev/null +++ b/addons/rose/app/components/rose/form/radio/card/tile/index.js @@ -0,0 +1 @@ +export { default } from 'rose/components/rose/form/radio/card/tile'; diff --git a/addons/rose/app/components/rose/form/radio/card/wide/index.js b/addons/rose/app/components/rose/form/radio/card/wide/index.js new file mode 100644 index 000000000..b239d9820 --- /dev/null +++ b/addons/rose/app/components/rose/form/radio/card/wide/index.js @@ -0,0 +1 @@ +export { default } from 'rose/components/rose/form/radio/card/wide'; diff --git a/addons/rose/app/components/rose/form/radio/radio-card/tile/index.js b/addons/rose/app/components/rose/form/radio/radio-card/tile/index.js deleted file mode 100644 index d3d617b77..000000000 --- a/addons/rose/app/components/rose/form/radio/radio-card/tile/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from 'rose/components/rose/form/radio/radio-card/tile'; diff --git a/addons/rose/app/components/rose/form/radio/radio-card/wide/index.js b/addons/rose/app/components/rose/form/radio/radio-card/wide/index.js deleted file mode 100644 index 5c17ecb7e..000000000 --- a/addons/rose/app/components/rose/form/radio/radio-card/wide/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from 'rose/components/rose/form/radio/radio-card/wide'; diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/-actions.hbs b/ui/admin/app/components/auth-methods/auth-method/accounts/account/actions/index.hbs similarity index 100% rename from ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/-actions.hbs rename to ui/admin/app/components/auth-methods/auth-method/accounts/account/actions/index.hbs diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/-header.hbs b/ui/admin/app/components/auth-methods/auth-method/accounts/account/header/index.hbs similarity index 100% rename from ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/-header.hbs rename to ui/admin/app/components/auth-methods/auth-method/accounts/account/header/index.hbs diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/-navigation.hbs b/ui/admin/app/components/auth-methods/auth-method/accounts/account/nav/index.hbs similarity index 100% rename from ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/-navigation.hbs rename to ui/admin/app/components/auth-methods/auth-method/accounts/account/nav/index.hbs diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/-actions.hbs b/ui/admin/app/components/auth-methods/auth-method/actions/index.hbs similarity index 97% rename from ui/admin/app/templates/scopes/scope/auth-methods/auth-method/-actions.hbs rename to ui/admin/app/components/auth-methods/auth-method/actions/index.hbs index 5626026a6..39c4a1d96 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/-actions.hbs +++ b/ui/admin/app/components/auth-methods/auth-method/actions/index.hbs @@ -21,7 +21,7 @@ @changed={{route-action 'changeState'}} as |radioGroup| > - {{#each this.oidcStates as |state|}} + {{#each @model.options.oidc.state as |state|}} {{t 'resources.managed-group.actions.delete'}} diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/-header.hbs b/ui/admin/app/components/auth-methods/auth-method/managed-groups/managed-group/header/index.hbs similarity index 100% rename from ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/-header.hbs rename to ui/admin/app/components/auth-methods/auth-method/managed-groups/managed-group/header/index.hbs diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/-navigation.hbs b/ui/admin/app/components/auth-methods/auth-method/managed-groups/managed-group/nav/index.hbs similarity index 100% rename from ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/-navigation.hbs rename to ui/admin/app/components/auth-methods/auth-method/managed-groups/managed-group/nav/index.hbs diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/-navigation.hbs b/ui/admin/app/components/auth-methods/auth-method/nav/index.hbs similarity index 100% rename from ui/admin/app/templates/scopes/scope/auth-methods/auth-method/-navigation.hbs rename to ui/admin/app/components/auth-methods/auth-method/nav/index.hbs diff --git a/ui/admin/app/templates/scopes/scope/users/user/-actions.hbs b/ui/admin/app/components/users/user/actions/index.hbs similarity index 100% rename from ui/admin/app/templates/scopes/scope/users/user/-actions.hbs rename to ui/admin/app/components/users/user/actions/index.hbs diff --git a/ui/admin/app/templates/scopes/scope/users/user/-header.hbs b/ui/admin/app/components/users/user/header/index.hbs similarity index 100% rename from ui/admin/app/templates/scopes/scope/users/user/-header.hbs rename to ui/admin/app/components/users/user/header/index.hbs diff --git a/ui/admin/app/templates/scopes/scope/users/user/-navigation.hbs b/ui/admin/app/components/users/user/nav/index.hbs similarity index 100% rename from ui/admin/app/templates/scopes/scope/users/user/-navigation.hbs rename to ui/admin/app/components/users/user/nav/index.hbs diff --git a/ui/admin/app/controllers/scopes/scope/auth-methods/auth-method.js b/ui/admin/app/controllers/scopes/scope/auth-methods/auth-method.js index 1aa269744..1005f0216 100644 --- a/ui/admin/app/controllers/scopes/scope/auth-methods/auth-method.js +++ b/ui/admin/app/controllers/scopes/scope/auth-methods/auth-method.js @@ -1,5 +1,4 @@ import Controller from '@ember/controller'; -import { options } from 'api/models/auth-method'; export default class ScopesScopeAuthMethodsAuthMethodController extends Controller { // =attributes @@ -11,12 +10,4 @@ export default class ScopesScopeAuthMethodsAuthMethodController extends Controll get breadCrumb() { return this.model.displayName; } - - /** - * OIDC auth-method states - * @type {[string]} - */ - get oidcStates() { - return options.oidc.state; - } } diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method.js b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method.js index c0678ed0a..bd2f8457e 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method.js @@ -15,30 +15,6 @@ export default class ScopesScopeAuthMethodsAuthMethodRoute extends Route { return this.store.findRecord('auth-method', auth_method_id); } - /** - * Renders the auth-method specific templates for header, navigation, - * and actions page sections. - * @override - */ - renderTemplate() { - super.renderTemplate(...arguments); - - this.render('scopes/scope/auth-methods/auth-method/-header', { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'header', - }); - - this.render('scopes/scope/auth-methods/auth-method/-navigation', { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'navigation', - }); - - this.render('scopes/scope/auth-methods/auth-method/-actions', { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'actions', - }); - } - // =actions /** diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts.js b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts.js index 9fcb9b990..5072d99b7 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts.js @@ -19,16 +19,23 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsRoute extends Route * Returns accounts for the current auth method. * @return {Promise{[AccountModel]}} */ - model() { + async model() { const authMethod = this.modelFor('scopes.scope.auth-methods.auth-method'); const { id: auth_method_id } = authMethod; + let accounts; + if ( this.can.can('list collection', authMethod, { collection: 'accounts', }) ) { - return this.store.query('account', { auth_method_id }); + accounts = await this.store.query('account', { auth_method_id }); } + + return { + authMethod, + accounts, + }; } // =actions diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account.js b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account.js index 8f90f239e..6ee0f3426 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account.js @@ -12,36 +12,4 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsAccountRoute extend model({ account_id }) { return this.store.findRecord('account', account_id, { reload: true }); } - - /** - * Renders the route-set specific page sections - * @override - */ - renderTemplate() { - super.renderTemplate(...arguments); - - this.render( - 'scopes/scope/auth-methods/auth-method/accounts/account/-header', - { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'header', - } - ); - - this.render( - 'scopes/scope/auth-methods/auth-method/accounts/account/-actions', - { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'actions', - } - ); - - this.render( - 'scopes/scope/auth-methods/auth-method/accounts/account/-navigation', - { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'navigation', - } - ); - } } diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/index.js b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/index.js index 20a6940d7..44cc36e3c 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/index.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/index.js @@ -1,10 +1,2 @@ import Route from '@ember/routing/route'; -export default class ScopesScopeAuthMethodsAuthMethodAccountsAccountIndexRoute extends Route { - // setupController(controller) { - // const authMethod = this.modelFor( - // 'scopes.scope.auth-methods.auth-method' - // ); - // super.setupController(...arguments); - // controller.setProperties({ authMethod }); - // } -} +export default class ScopesScopeAuthMethodsAuthMethodAccountsAccountIndexRoute extends Route {} diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js index 019933eaf..c1a1ba32f 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js @@ -11,23 +11,6 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsAccountSettingsRout @service notify; @service router; - // =methods - - /** - * Renders the route-set specific page sections - * @override - */ - renderTemplate() { - super.renderTemplate(...arguments); - this.render( - 'scopes/scope/auth-methods/auth-method/accounts/account/set-password/-header', - { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'header', - } - ); - } - // =actions /** diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/new.js b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/new.js index 2d31bd683..4f5d11f57 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/new.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/new.js @@ -16,27 +16,4 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsNewRoute extends Ro auth_method_id, }); } - - /** - * Renders new account templates for header, navigation, and action page sections. - * @override - */ - renderTemplate() { - super.renderTemplate(...arguments); - - this.render('scopes/scope/auth-methods/auth-method/accounts/new/-header', { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'header', - }); - - this.render('_empty', { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'actions', - }); - - this.render('_empty', { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'navigation', - }); - } } diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups.js b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups.js index 51b55adb9..6a558f0ad 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups.js @@ -19,16 +19,24 @@ export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsRoute extends * * @returns {Promise{[ManagedGroupsModel]}} */ - model() { + async model() { const authMethod = this.modelFor('scopes.scope.auth-methods.auth-method'); const { id: auth_method_id } = authMethod; const canListManagedGroups = this.can.can('list collection', authMethod, { collection: 'managed-groups', }); + let managedGroups; if (canListManagedGroups) { - return this.store.query('managed-group', { auth_method_id }); + managedGroups = await this.store.query('managed-group', { + auth_method_id, + }); } + + return { + authMethod, + managedGroups, + }; } // =actions @@ -81,7 +89,7 @@ export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsRoute extends @confirm('questions.delete-confirm') @notifyError(({ message }) => message, { catch: true }) @notifySuccess('notifications.delete-success') - async delete(managedGroup) { + async deleteManagedGroup(managedGroup) { await managedGroup.destroyRecord(); await this.router.replaceWith( 'scopes.scope.auth-methods.auth-method.managed-groups' diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group.js b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group.js index 816b537da..414bfd6b8 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group.js @@ -14,36 +14,4 @@ export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsManagedGroupRo reload: true, }); } - - /** - * Render the route-set specific page sections - * @override - */ - renderTemplate() { - super.renderTemplate(...arguments); - - this.render( - 'scopes/scope/auth-methods/auth-method/managed-groups/managed-group/-header', - { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'header', - } - ); - - this.render( - 'scopes/scope/auth-methods/auth-method/managed-groups/managed-group/-actions', - { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'actions', - } - ); - - this.render( - 'scopes/scope/auth-methods/auth-method/managed-groups/managed-group/-navigation', - { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'navigation', - } - ); - } } diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/members.js b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/members.js index 1c3dd319c..30e1a98e8 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/members.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/members.js @@ -12,15 +12,19 @@ export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsManagedGroupMe * Returns the previously loaded managed group instances memebrs. * @return {Promise{[AccountModel]}} */ - model() { - const { auth_method_id, member_ids } = this.modelFor( + async model() { + const managedGroup = this.modelFor( 'scopes.scope.auth-methods.auth-method.managed-groups.managed-group' ); + const { auth_method_id, member_ids } = managedGroup; - return this.resourceFilterStore.queryBy( - 'account', - { id: member_ids }, - { auth_method_id } - ); + return { + managedGroup, + members: await this.resourceFilterStore.queryBy( + 'account', + { id: member_ids }, + { auth_method_id } + ), + }; } } diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/new.js b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/new.js index ca2b1473c..702d4bb6e 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/new.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/new.js @@ -11,26 +11,4 @@ export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsNewRoute exten auth_method_id, }); } - - renderTemplate() { - super.renderTemplate(...arguments); - - this.render( - 'scopes/scope/auth-methods/auth-method/managed-groups/new/-header', - { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'header', - } - ); - - this.render('_empty', { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'actions', - }); - - this.render('_empty', { - into: 'scopes/scope/auth-methods/auth-method', - outlet: 'navigation', - }); - } } diff --git a/ui/admin/app/routes/scopes/scope/users/user.js b/ui/admin/app/routes/scopes/scope/users/user.js index 2d7ed072e..d26912707 100644 --- a/ui/admin/app/routes/scopes/scope/users/user.js +++ b/ui/admin/app/routes/scopes/scope/users/user.js @@ -12,27 +12,4 @@ export default class ScopesScopeUsersUserRoute extends Route { async model({ user_id }) { return this.store.findRecord('user', user_id); } - - /** - * Renders the route-set specific page sections - * @override - */ - renderTemplate() { - super.renderTemplate(...arguments); - - this.render('scopes/scope/users/user/-header', { - into: 'scopes/scope/users/user', - outlet: 'header', - }); - - this.render('scopes/scope/users/user/-actions', { - into: 'scopes/scope/users/user', - outlet: 'actions', - }); - - this.render('scopes/scope/users/user/-navigation', { - into: 'scopes/scope/users/user', - outlet: 'navigation', - }); - } } diff --git a/ui/admin/app/routes/scopes/scope/users/user/add-accounts.js b/ui/admin/app/routes/scopes/scope/users/user/add-accounts.js index ab62093a4..992f90a0e 100644 --- a/ui/admin/app/routes/scopes/scope/users/user/add-accounts.js +++ b/ui/admin/app/routes/scopes/scope/users/user/add-accounts.js @@ -38,29 +38,6 @@ export default class ScopesScopeUsersUserAddAccountsRoute extends Route { return { user, authMethods, accounts }; } - /** - * Renders the route-set specific page sections - * @override - */ - renderTemplate() { - super.renderTemplate(...arguments); - - this.render('scopes/scope/users/user/add-accounts/-header', { - into: 'scopes/scope/users/user', - outlet: 'header', - }); - - this.render('-empty', { - into: 'scopes/scope/users/user', - outlet: 'actions', - }); - - this.render('-empty', { - into: 'scopes/scope/users/user', - outlet: 'navigation', - }); - } - // =actions /** diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method.hbs index 837d1f984..7d32ecb0d 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method.hbs @@ -1,25 +1,3 @@ {{page-title @model.displayName}} - - - - - - - - {{outlet 'header'}} - - - - {{outlet 'navigation'}} - - - - {{outlet 'actions'}} - - - - {{outlet}} - - - \ No newline at end of file +{{outlet}} \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/index.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/index.hbs index e20c46a14..128f07833 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/index.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/index.hbs @@ -1,5 +1,28 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/set-password.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/set-password.hbs index 58be5da25..07eacdb14 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/set-password.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/set-password.hbs @@ -1,7 +1,37 @@ {{page-title (t 'actions.set-password')}} - \ No newline at end of file + + + + + + + +

{{t 'resources.account.title'}}

+

{{t 'resources.account.messages.set-password.description'}}

+ + {{@model.id}} + +
+ + + + + + + + + + + + + +
\ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/set-password/-header.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/set-password/-header.hbs deleted file mode 100644 index da4406391..000000000 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/set-password/-header.hbs +++ /dev/null @@ -1,9 +0,0 @@ -

{{t 'resources.account.title'}}

-

{{t 'resources.account.messages.set-password.description'}}

- - {{@model.id}} - \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs index 67ba884ae..23568129e 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs @@ -1,149 +1,175 @@ -{{#if @model}} - {{! OIDC accounts display more fields }} - {{#if @model.firstObject.isOIDC}} - - - - {{t 'form.name.label'}} - {{t 'form.issuer.label'}} - {{t 'form.subject.label'}} - {{t 'form.email.label'}} - {{t 'form.full_name.label'}} - {{t 'form.type.label'}} - {{t 'form.id.label'}} - - - - {{#each @model as |account|}} - - - {{#if (can 'read model' account)}} - - {{account.accountName}} - - {{else}} - {{account.accountName}} - {{/if}} -

{{account.description}}

-
- - {{account.attributes.issuer}} - - - {{account.attributes.subject}} - - - {{account.attributes.email}} - - - {{account.attributes.full_name}} - - - {{account.type}} - - - - {{account.id}} - - -
- {{/each}} -
-
- {{else}} - - - - {{t 'form.name.label'}} - {{t 'form.login_name.label'}} - {{t 'form.type.label'}} - {{t 'form.id.label'}} - - - - {{#each @model as |account|}} - - - {{#if (can 'read model' account)}} - - {{account.accountName}} - - {{else}} - {{account.accountName}} - {{/if}} -

{{account.description}}

-
- - {{account.attributes.login_name}} - - - {{account.type}} - - - - {{account.id}} - - -
- {{/each}} -
-
- {{/if}} -{{else}} + - - - + + + - {{#if (can 'list collection' this.authMethod collection='accounts')}} - {{! can list (at least): show default welcome message}} - {{t 'resources.account.description'}} + + + - {{else if (can - 'create collection' this.authMethod collection='accounts' - )}} - {{! can create (only): show create-but-not-list welcome message}} - {{t - 'descriptions.create-but-not-list' - resource=(t 'resources.account.title_plural') - }} - {{else}} - {{! can neither list nor create }} - {{t - 'descriptions.neither-list-nor-create' - resource=(t 'resources.account.title_plural') - }} - {{/if}} + + + - + + + - {{#if (can 'create collection' this.authMethod collection='accounts')}} - - - - {{t 'resources.account.actions.create'}} - + + {{#if @model.accounts}} + {{! OIDC accounts display more fields }} + {{#if @model.accounts.firstObject.isOIDC}} + + + + {{t 'form.name.label'}} + {{t 'form.issuer.label'}} + {{t 'form.subject.label'}} + {{t 'form.email.label'}} + {{t 'form.full_name.label'}} + {{t 'form.type.label'}} + {{t 'form.id.label'}} + + + + {{#each @model.accounts as |account|}} + + + {{#if (can 'read model' account)}} + + {{account.accountName}} + + {{else}} + {{account.accountName}} + {{/if}} +

{{account.description}}

+
+ + {{account.attributes.issuer}} + + + {{account.attributes.subject}} + + + {{account.attributes.email}} + + + {{account.attributes.full_name}} + + + {{account.type}} + + + + {{account.id}} + + +
+ {{/each}} +
+
+ {{else}} + + + + {{t 'form.name.label'}} + {{t 'form.login_name.label'}} + {{t 'form.type.label'}} + {{t 'form.id.label'}} + + + + {{#each @model.accounts as |account|}} + + + {{#if (can 'read model' account)}} + + {{account.accountName}} + + {{else}} + {{account.accountName}} + {{/if}} +

{{account.description}}

+
+ + {{account.attributes.login_name}} + + + {{account.type}} + + + + {{account.id}} + + +
+ {{/each}} +
+
{{/if}} -
-
+ {{else}} -{{/if}} \ No newline at end of file + + + + + {{#if + (can 'list collection' this.authMethod collection='accounts') + }} + {{! can list (at least): show default welcome message}} + {{t 'resources.account.description'}} + + {{else if (can + 'create collection' this.authMethod collection='accounts' + )}} + {{! can create (only): show create-but-not-list welcome message}} + {{t + 'descriptions.create-but-not-list' + resource=(t 'resources.account.title_plural') + }} + {{else}} + {{! can neither list nor create }} + {{t + 'descriptions.neither-list-nor-create' + resource=(t 'resources.account.title_plural') + }} + {{/if}} + + + + {{#if + (can 'create collection' this.authMethod collection='accounts') + }} + + + + {{t 'resources.account.actions.create'}} + + {{/if}} + + + + {{/if}} + + +
\ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/new.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/new.hbs index e20c46a14..fac7d93fb 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/new.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/new.hbs @@ -1,5 +1,23 @@ - \ No newline at end of file + + + + + + + +

+ {{t 'titles.new'}} + +

+
+ + + + + + +
\ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/new/-header.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/new/-header.hbs deleted file mode 100644 index 0144711e6..000000000 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/new/-header.hbs +++ /dev/null @@ -1,4 +0,0 @@ -

- {{t 'titles.new'}} - -

\ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/index.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/index.hbs index e3302df0b..2360f98a6 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/index.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/index.hbs @@ -1,8 +1,30 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/index.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/index.hbs index c482fd414..cce1b218b 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/index.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/index.hbs @@ -1,86 +1,112 @@ -{{#if @model}} - - - - {{t 'form.name.label'}} - {{t 'form.description.label'}} - {{t 'form.type.label'}} - {{t 'form.id.label'}} - - + - - {{#each @model as |managed-group|}} - - - {{#if (can 'read model' managed-group)}} - - {{managed-group.displayName}} - - {{else}} - {{managed-group.displayName}} - {{/if}} - - {{managed-group.description}} - - {{managed-group.type}} - - - - {{managed-group.id}} - - - - {{/each}} - - -{{else}} - - - + + + - {{#if - (can 'list collection' this.authMethod collection='managed-groups') - }} - {{! Can list (at least): show default welcome message }} - {{t 'resources.managed-group.description'}} - {{else if (can - 'create collection' this.authMethod collection='managed-groups' - )}} - {{! Can create only: show create but not list welcome message }} - {{t - 'descriptions.create-but-not-list' - resource=(t 'resources.managed-group.title_plural') - }} - {{else}} - {{! Can neither list nor create }} - {{t - 'descriptions.neither-list-nor-create' - resource=(t 'resources.managed-group.title_plural') - }} - {{/if}} - + + + - {{#if - (can 'create collection' this.authMethod collection='managed-groups') - }} - + + + + + + + + + {{#if @model.managedGroups}} + + + + {{t 'form.name.label'}} + {{t 'form.description.label'}} + {{t 'form.type.label'}} + {{t 'form.id.label'}} + + + + + {{#each @model.managedGroups as |managed-group|}} + + + {{#if (can 'read model' managed-group)}} + + {{managed-group.displayName}} + + {{else}} + {{managed-group.displayName}} + {{/if}} + + {{managed-group.description}} + + {{managed-group.type}} + + + + {{managed-group.id}} + + + + {{/each}} + + + {{else}} + + - - {{t 'resources.managed-group.actions.create'}} - - {{/if}} - - -{{/if}} \ No newline at end of file + + + {{#if + (can + 'list collection' this.authMethod collection='managed-groups' + ) + }} + {{! Can list (at least): show default welcome message }} + {{t 'resources.managed-group.description'}} + {{else if (can + 'create collection' this.authMethod collection='managed-groups' + )}} + {{! Can create only: show create but not list welcome message }} + {{t + 'descriptions.create-but-not-list' + resource=(t 'resources.managed-group.title_plural') + }} + {{else}} + {{! Can neither list nor create }} + {{t + 'descriptions.neither-list-nor-create' + resource=(t 'resources.managed-group.title_plural') + }} + {{/if}} + + + {{#if + (can + 'create collection' this.authMethod collection='managed-groups' + ) + }} + + + {{t 'resources.managed-group.actions.create'}} + + {{/if}} + + + {{/if}} + + + \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/index.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/index.hbs index bcaa893ac..8abc571c3 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/index.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/index.hbs @@ -1,5 +1,33 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/members.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/members.hbs index 8f942d312..5111f1838 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/members.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/members.hbs @@ -1,62 +1,90 @@ {{page-title (t 'resources.managed-group.member.title_plural')}} -{{#if @model}} - - - - {{t 'form.name.label'}} - {{t 'form.issuer.label'}} - {{t 'form.subject.label'}} - {{t 'form.email.label'}} - {{t 'form.full_name.label'}} - {{t 'form.type.label'}} - {{t 'form.id.label'}} - - - - {{#each @model as |member|}} - - - {{member.accountName}} -

{{member.description}}

-
- - {{member.attributes.issuer}} - - - {{member.attributes.subject}} - - - {{member.attributes.email}} - - - {{member.attributes.full_name}} - - - {{member.type}} - - - - {{member.id}} - - -
- {{/each}} -
-
-{{else}} - - - - {{t 'resources.managed-group.member.messages.description'}} - - - -{{/if}} \ No newline at end of file + + + + + + + + + + + + + + + + + + + + {{#if @model.members}} + + + + {{t 'form.name.label'}} + {{t 'form.issuer.label'}} + {{t 'form.subject.label'}} + {{t 'form.email.label'}} + {{t 'form.full_name.label'}} + {{t 'form.type.label'}} + {{t 'form.id.label'}} + + + + {{#each @model.members as |member|}} + + + {{member.accountName}} +

{{member.description}}

+
+ + {{member.attributes.issuer}} + + + {{member.attributes.subject}} + + + {{member.attributes.email}} + + + {{member.attributes.full_name}} + + + {{member.type}} + + + + {{member.id}} + + +
+ {{/each}} +
+
+ {{else}} + + + + {{t 'resources.managed-group.member.messages.description'}} + + + + {{/if}} +
+ +
\ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/new.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/new.hbs index bcaa893ac..24a69bfbb 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/new.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/new.hbs @@ -1,5 +1,23 @@ - \ No newline at end of file + + + + + + + +

+ {{t 'titles.new'}} + {{! TODO: change the icon link }} + +

+
+ + + + + +
\ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/new/-header.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/new/-header.hbs deleted file mode 100644 index b6e89205e..000000000 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/new/-header.hbs +++ /dev/null @@ -1,5 +0,0 @@ -

- {{t 'titles.new'}} - {{! TODO: change the icon link }} - -

\ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/index.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/index.hbs index ea12808c3..b2380e0fb 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/index.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/index.hbs @@ -35,7 +35,6 @@ - {{#if (or @model diff --git a/ui/admin/app/templates/scopes/scope/users/user.hbs b/ui/admin/app/templates/scopes/scope/users/user.hbs index 837d1f984..7d32ecb0d 100644 --- a/ui/admin/app/templates/scopes/scope/users/user.hbs +++ b/ui/admin/app/templates/scopes/scope/users/user.hbs @@ -1,25 +1,3 @@ {{page-title @model.displayName}} - - - - - - - - {{outlet 'header'}} - - - - {{outlet 'navigation'}} - - - - {{outlet 'actions'}} - - - - {{outlet}} - - - \ No newline at end of file +{{outlet}} \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/users/user/accounts.hbs b/ui/admin/app/templates/scopes/scope/users/user/accounts.hbs index a61d813a0..e7373ac9e 100644 --- a/ui/admin/app/templates/scopes/scope/users/user/accounts.hbs +++ b/ui/admin/app/templates/scopes/scope/users/user/accounts.hbs @@ -1,79 +1,101 @@ {{page-title (t 'resources.user.messages.accounts.title')}} -{{#if @model.accounts}} + - - - - {{t 'form.name.label'}} - {{t 'form.type.label'}} - {{t 'form.id.label'}} - {{t 'titles.actions'}} - - - - {{#each @model.accounts as |account|}} - - - {{account.accountName}} -

{{account.description}}

-
- - - {{t (concat 'resources.auth-method.types.' account.type)}} - - - - - {{account.id}} - - - - {{#if (can 'removeAccounts user' @model.user)}} - - + + + + + + + + + + + + + + + + + {{#if @model.accounts}} + + + + + {{t 'form.name.label'}} + {{t 'form.type.label'}} + {{t 'form.id.label'}} + {{t 'titles.actions'}} + + + + {{#each @model.accounts as |account|}} + + + {{account.accountName}} +

{{account.description}}

+
+ + + {{t (concat 'resources.auth-method.types.' account.type)}} + + + + - {{t 'actions.remove'}} -
-
- {{/if}} -
-
- {{/each}} -
-
+ {{account.id}} + + + + {{#if (can 'removeAccounts user' @model.user)}} + + + {{t 'actions.remove'}} + + + {{/if}} + + + {{/each}} + + -{{else}} + {{else}} - - - - {{t 'resources.user.messages.accounts.description'}} - - - - {{t 'resources.user.actions.add-accounts'}} - - - + + + + {{t 'resources.user.messages.accounts.description'}} + + + + {{t 'resources.user.actions.add-accounts'}} + + + -{{/if}} \ No newline at end of file + {{/if}} +
+ + \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/users/user/add-accounts.hbs b/ui/admin/app/templates/scopes/scope/users/user/add-accounts.hbs index 4f514a506..df557eb09 100644 --- a/ui/admin/app/templates/scopes/scope/users/user/add-accounts.hbs +++ b/ui/admin/app/templates/scopes/scope/users/user/add-accounts.hbs @@ -1,28 +1,43 @@ {{page-title (t 'resources.user.actions.add-accounts')}} -{{#if @model.accounts}} - -{{/if}} + -{{#unless @model.accounts}} - - - - {{t 'resources.user.messages.no-accounts.description'}} - - - - {{t 'actions.back'}} - - - -{{/unless}} \ No newline at end of file + + + + + +

{{t 'resources.user.messages.add-accounts.title'}}

+

{{t 'resources.user.messages.add-accounts.description'}}

+
+ + + {{#if @model.accounts}} + + {{/if}} + + {{#unless @model.accounts}} + + + + {{t 'resources.user.messages.no-accounts.description'}} + + + + {{t 'actions.back'}} + + + + {{/unless}} + + +
\ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/users/user/add-accounts/-header.hbs b/ui/admin/app/templates/scopes/scope/users/user/add-accounts/-header.hbs deleted file mode 100644 index 91acf84fd..000000000 --- a/ui/admin/app/templates/scopes/scope/users/user/add-accounts/-header.hbs +++ /dev/null @@ -1,2 +0,0 @@ -

{{t 'resources.user.messages.add-accounts.title'}}

-

{{t 'resources.user.messages.add-accounts.description'}}

\ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/users/user/index.hbs b/ui/admin/app/templates/scopes/scope/users/user/index.hbs index e90a1ff9a..c5530509a 100644 --- a/ui/admin/app/templates/scopes/scope/users/user/index.hbs +++ b/ui/admin/app/templates/scopes/scope/users/user/index.hbs @@ -1,5 +1,27 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file