Add managed groups to auth method JUST if is type oidc. Within auth method, show the managed groups tabs JUST if type is oidc

This commit is contained in:
Carlos Alcaide Corvo committed 2021-11-10 07:47:51 -08:00
1 parent b7bf44b997
commit f8bb37e5af
4 files changed
+12 -7

No files matched your search

+3 -1
View File
@@ -34,7 +34,9 @@ export default factory.extend({
user.update({ accountIds: [id] });
});
server.createList('managed-group', 2, { scope, authMethod });
if (type === 'oidc') {
server.createList('managed-group', 2, { scope, authMethod });
}
},
}),
});
+1 -1
View File
@@ -22,7 +22,7 @@ export default function (server) {
// Auth
const globalAuthMethods = server.createList(
'auth-method',
1,
4,
{ scope: globalScope },
'withAccountsAndUsersAndManagedGroups'
);
@@ -10,8 +10,10 @@
{{/if}}
{{#if (feature-flag 'managed-groups')}}
<nav.link @route='scopes.scope.auth-methods.auth-method.managed-groups'>
{{t 'resources.managed-group.title_plural'}}
</nav.link>
{{#if @model.isOIDC}}
<nav.link @route='scopes.scope.auth-methods.auth-method.managed-groups'>
{{t 'resources.managed-group.title_plural'}}
</nav.link>
{{/if}}
{{/if}}
</Rose::Nav::Tabs>
</Rose::Nav::Tabs>
@@ -1,3 +1,4 @@
<h2>{{@model.type}}</h2>
<Form::AuthMethod
@model={{@model}}
@submit={{route-action 'save' @model}}
@@ -5,4 +6,4 @@
@removeItemByIndex={{route-action 'removeItemByIndex' @model}}
@addStringItem={{route-action 'addStringItem' @model}}
@addAccountClaimMapItem={{route-action 'addAccountClaimMapItem' @model}}
/>
/>