Add managed-groups basic route to admin. Wrap all in a feature flag

This commit is contained in:
Carlos Alcaide Corvo committed 2021-11-08 07:48:57 -08:00
1 parent 31575b900b
commit 288b32f862
7 files changed
+35

No files matched your search

@@ -351,3 +351,6 @@ scope:
title_plural: Scopes
messages:
cannot_read: While you do not have permission to read this scope, you may have permission to view resources within it.
managed-group:
title: Managed Group
title_plural: Managed Groups
+1
View File
@@ -55,6 +55,7 @@ Router.map(function () {
});
this.route('new');
});
this.route('managed-groups');
});
this.route('new');
});
@@ -0,0 +1,3 @@
import Route from '@ember/routing/route';
export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsRoute extends Route {}
@@ -8,4 +8,10 @@
{{t 'resources.account.title_plural'}}
</nav.link>
{{/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}}
</Rose::Nav::Tabs>
@@ -0,0 +1,3 @@
{{page-title (t 'resources.managed-group.title_plural')}}
{{outlet}}
+3
View File
@@ -96,6 +96,7 @@ module.exports = function (environment) {
filter: false,
capabilities: true,
'credential-store': true,
'managed-groups': false,
},
};
@@ -133,6 +134,7 @@ module.exports = function (environment) {
// Enable features in development
ENV.featureFlags['capabilities'] = true;
ENV.featureFlags['filter'] = true;
ENV.featureFlags['managed-groups'] = true;
}
if (environment === 'test') {
@@ -159,6 +161,7 @@ module.exports = function (environment) {
// Enable tests for development features
ENV.featureFlags['capabilities'] = true;
ENV.featureFlags['filter'] = true;
ENV.featureFlags['managed-groups'] = true;
}
if (environment === 'production') {
@@ -0,0 +1,16 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module(
'Unit | Route | scopes/scope/auth-methods/auth-method/managed-groups',
function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
let route = this.owner.lookup(
'route:scopes/scope/auth-methods/auth-method/managed-groups'
);
assert.ok(route);
});
}
);