diff --git a/ui/core/app/templates/scopes/index.hbs b/ui/core/app/templates/scopes/index.hbs index e2147cab0..22ebdf082 100644 --- a/ui/core/app/templates/scopes/index.hbs +++ b/ui/core/app/templates/scopes/index.hbs @@ -1 +1,22 @@ -{{outlet}} \ No newline at end of file +{{outlet}} + +{{#unless @model}} + + + +
+ + + + {{t "auth.descriptions.no-scopes"}} + + + +
+
+ +
+{{/unless}} diff --git a/ui/core/tests/acceptance/authentication-test.js b/ui/core/tests/acceptance/authentication-test.js index a429349e9..478e2f1dd 100644 --- a/ui/core/tests/acceptance/authentication-test.js +++ b/ui/core/tests/acceptance/authentication-test.js @@ -50,6 +50,16 @@ module('Acceptance | authentication', function (hooks) { projectsURL = `/scopes/${orgScopeID}/projects`; }); + + test('visiting scopes when there are none shows a message', async function (assert) { + assert.expect(2); + this.server.get('/scopes', () => new Response(404)); + await visit(scopesURL); + await a11yAudit(); + assert.equal(currentURL(), scopesURL); + assert.ok(find('.rose-message')); + }); + test('visiting auth methods authenticate route redirects to first auth method', async function (assert) { assert.expect(1); await visit(authenticateURL); diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index e563eb166..d2b11942c 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -6,16 +6,16 @@ actions: help: Need help? authenticate: Authenticate deauthenticate: Deauthenticate - choose-org: Choose Org - choose-different-org: Choose a Different Org + choose-org: Choose Scope + choose-different-org: Choose a Different Scope auth: titles: - no-orgs: No Organizations Available + no-scopes: No Scopes Available no-methods: No Authentication Method descriptions: - no-orgs: No organizations were found. To authenticate, ask your administrator to create an organization and grant you access. - no-methods: No authentication methods were found for this organization. Switch organizations and try again. - choose-org: Choose an organization to authenticate. + no-scopes: No scopes were found. To authenticate, ask your administrator to create an scope and grant you access. + no-methods: No authentication methods were found for this scope. Switch scopes and try again. + choose-org: Choose a scope to authenticate. authenticating-with-org: "You're authenticating with {name}." method-types: password: Password @@ -84,7 +84,7 @@ notify: save-success: Saved succesfully. delete-success: Deleted successfully. dev: - default-org: Default Org + default-org: Default Scope menu-item: Menu item button-menu-item: Button menu item section: Section