From f406fc38610e7e3f2c220a4937db73197f35ed18 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 16 Mar 2021 15:41:13 -0400 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20oidc=20auth=20methods?= =?UTF-8?q?=20are=20not=20yet=20editable=20in=20admin=20ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/addon/models/auth-method.js | 18 +++++++++++++++++- addons/core/translations/resources/en-us.yaml | 1 + .../scopes/scope/auth-methods/index.hbs | 14 +++++++++----- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/addons/api/addon/models/auth-method.js b/addons/api/addon/models/auth-method.js index ad795fd7d..a47019a23 100644 --- a/addons/api/addon/models/auth-method.js +++ b/addons/api/addon/models/auth-method.js @@ -1,3 +1,19 @@ import GeneratedAuthMethodModel from '../generated/models/auth-method'; -export default class AuthMethodModel extends GeneratedAuthMethodModel {} +export default class AuthMethodModel extends GeneratedAuthMethodModel { + // =attributes + + /** + * @type {boolean} + */ + get isPassword() { + return this.type === 'password'; + } + + /** + * @type {boolean} + */ + get isOIDC() { + return this.type === 'oidc'; + } +} diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index e670a70d7..4a9aaeca1 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -26,6 +26,7 @@ auth-method: description: No auth methods were found for this scope. types: password: Password + oidc: OIDC actions: create: Create Auth Method delete: Delete Auth Method 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 e0c150dfa..a400f20c4 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/index.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/index.hbs @@ -43,12 +43,16 @@ {{#each @model as |authMethod|}} - + {{#if authMethod.isPassword}} + + {{authMethod.displayName}} + + {{else}} {{authMethod.displayName}} - + {{/if}}

{{authMethod.description}}