feat: 🎸 OIDC feature flag (disabled in production)
This commit is contained in:
6 files changed
+52
-15
No files matched your search
@@ -37,6 +37,7 @@
|
||||
"ember-loading": "^0.4.0",
|
||||
"ember-page-title": "^6.0.3",
|
||||
"ember-route-action-helper": "^2.0.8",
|
||||
"ember-feature-flags": "^6.0.0",
|
||||
"rose": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -28,15 +28,31 @@
|
||||
<Rose::Separator />
|
||||
|
||||
<Rose::Nav::Tabs as |nav|>
|
||||
{{#each @model.authMethods as |authMethod|}}
|
||||
<nav.link @route="scopes.scope.authenticate.method" @model={{authMethod.id}}>
|
||||
{{#if authMethod.name}}
|
||||
{{authMethod.name}}
|
||||
{{else}}
|
||||
{{t (concat "resources.auth-method.types." authMethod.type)}}
|
||||
{{/if}}
|
||||
</nav.link>
|
||||
{{/each}}
|
||||
{{#if (feature-flag 'oidc')}}
|
||||
{{! OIDC enable: list all auth methods }}
|
||||
{{#each @model.authMethods as |authMethod|}}
|
||||
<nav.link @route="scopes.scope.authenticate.method" @model={{authMethod.id}}>
|
||||
{{#if authMethod.name}}
|
||||
{{authMethod.name}}
|
||||
{{else}}
|
||||
{{t (concat "resources.auth-method.types." authMethod.type)}}
|
||||
{{/if}}
|
||||
</nav.link>
|
||||
{{/each}}
|
||||
{{else}}
|
||||
{{! OIDC disabled: filter out OIDC auth methods}}
|
||||
{{#each @model.authMethods as |authMethod|}}
|
||||
{{#unless authMethod.isOIDC}}
|
||||
<nav.link @route="scopes.scope.authenticate.method" @model={{authMethod.id}}>
|
||||
{{#if authMethod.name}}
|
||||
{{authMethod.name}}
|
||||
{{else}}
|
||||
{{t (concat "resources.auth-method.types." authMethod.type)}}
|
||||
{{/if}}
|
||||
</nav.link>
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
</Rose::Nav::Tabs>
|
||||
|
||||
{{#if @model.authMethods}}
|
||||
|
||||
@@ -86,6 +86,7 @@ module.exports = function (environment) {
|
||||
},
|
||||
|
||||
featureFlags: {
|
||||
oidc: false,
|
||||
'primary-auth-method': false,
|
||||
},
|
||||
};
|
||||
@@ -123,6 +124,7 @@ module.exports = function (environment) {
|
||||
|
||||
// Enable features in development
|
||||
ENV.featureFlags['primary-auth-method'] = true;
|
||||
ENV.featureFlags['oidc'] = true;
|
||||
}
|
||||
|
||||
if (environment === 'test') {
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
"ember-concurrency": "^1.3.0",
|
||||
"ember-exam": "^6.0.1",
|
||||
"ember-export-application-global": "^2.0.1",
|
||||
"ember-feature-flags": "^6.0.0",
|
||||
"ember-inline-svg": "^1.0.0",
|
||||
"ember-load-initializers": "^2.1.2",
|
||||
"ember-maybe-import-regenerator": "^0.1.6",
|
||||
|
||||
@@ -21,11 +21,23 @@
|
||||
</Rose::Dropdown>
|
||||
|
||||
<Rose::Nav::Tabs as |nav|>
|
||||
{{#each @model.authMethods as |authMethod|}}
|
||||
<nav.link @route="scopes.scope.authenticate.method" @model={{authMethod.id}}>
|
||||
{{t (concat "resources.auth-method.types." authMethod.type)}}
|
||||
</nav.link>
|
||||
{{/each}}
|
||||
{{#if (feature-flag 'oidc')}}
|
||||
{{! OIDC enable: list all auth methods }}
|
||||
{{#each @model.authMethods as |authMethod|}}
|
||||
<nav.link @route="scopes.scope.authenticate.method" @model={{authMethod.id}}>
|
||||
{{t (concat "resources.auth-method.types." authMethod.type)}}
|
||||
</nav.link>
|
||||
{{/each}}
|
||||
{{else}}
|
||||
{{! OIDC disabled: filter out OIDC auth methods}}
|
||||
{{#each @model.authMethods as |authMethod|}}
|
||||
{{#unless authMethod.isOIDC}}
|
||||
<nav.link @route="scopes.scope.authenticate.method" @model={{authMethod.id}}>
|
||||
{{t (concat "resources.auth-method.types." authMethod.type)}}
|
||||
</nav.link>
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
</Rose::Nav::Tabs>
|
||||
|
||||
{{#if @model.authMethods}}
|
||||
|
||||
@@ -52,6 +52,10 @@ module.exports = function (environment) {
|
||||
sessions: '/sessions',
|
||||
},
|
||||
},
|
||||
|
||||
featureFlags: {
|
||||
oidc: false,
|
||||
},
|
||||
};
|
||||
|
||||
if (process.env.ENABLE_MIRAGE) {
|
||||
@@ -69,6 +73,9 @@ module.exports = function (environment) {
|
||||
// of the UI, which only makes sense in development where the origin is
|
||||
// usually the same as the application origin.
|
||||
ENV.autoOrigin = true;
|
||||
|
||||
// Enable features in development
|
||||
ENV.featureFlags['oidc'] = true;
|
||||
}
|
||||
|
||||
if (environment === 'test') {
|
||||
|
||||
Reference in new issue
Block a user