fix: 🐛 OIDC authentications not properly showing username (#2930)
* fix: 🐛 properly show username for oidc auth method in user menu * test: 💍 fix admin ui tests * test: 💍 fix desktop ui tests * refactor: 💡 admin to not store username in authenticated object * refactor: 💡 use getter in app controller * test: 💍 POC for how we could update our tests to use auth account * refactor: 💡 remove unused service * test: 💍 fix all tests in ui/admin * test: 💍 revert one change * refactor: 💡 update ui/desktop w/ feedback + fix tests * refactor: 💡 add in error handling * refactor: 💡 cleanup unused service * test: 💍 fix e2e test selector ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17231
This commit is contained in:
1 parent
838bc37243
commit
72f7c8a92d
195 files changed
+720
-1112
No files matched your search
@@ -36,12 +36,19 @@ module('Unit | Controller | scopes/scope/roles/index', function (hooks) {
|
||||
};
|
||||
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
intl = this.owner.lookup('service:intl');
|
||||
store = this.owner.lookup('service:store');
|
||||
controller = this.owner.lookup('controller:scopes/scope/roles/index');
|
||||
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.global = this.server.create(
|
||||
'scope',
|
||||
{ id: 'global' },
|
||||
'withGlobalAuth',
|
||||
);
|
||||
await authenticateSession({
|
||||
isGlobal: true,
|
||||
account_id: this.server.schema.accounts.first().id,
|
||||
});
|
||||
instances.role = this.server.create('role', {
|
||||
scope: instances.scopes.global,
|
||||
});
|
||||
|
||||
@@ -38,13 +38,20 @@ module(
|
||||
};
|
||||
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
store = this.owner.lookup('service:store');
|
||||
controller = this.owner.lookup(
|
||||
'controller:scopes/scope/roles/role/add-principals',
|
||||
);
|
||||
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.global = this.server.create(
|
||||
'scope',
|
||||
{ id: 'global' },
|
||||
'withGlobalAuth',
|
||||
);
|
||||
await authenticateSession({
|
||||
isGlobal: true,
|
||||
account_id: this.server.schema.accounts.first().id,
|
||||
});
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
scope: { id: 'global', type: 'global' },
|
||||
|
||||
@@ -28,11 +28,18 @@ module('Unit | Controller | scopes/scope/roles/role/grants', function (hooks) {
|
||||
};
|
||||
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
store = this.owner.lookup('service:store');
|
||||
controller = this.owner.lookup('controller:scopes/scope/roles/role/grants');
|
||||
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.global = this.server.create(
|
||||
'scope',
|
||||
{ id: 'global' },
|
||||
'withGlobalAuth',
|
||||
);
|
||||
await authenticateSession({
|
||||
isGlobal: true,
|
||||
account_id: this.server.schema.accounts.first().id,
|
||||
});
|
||||
instances.role = this.server.create('role', {
|
||||
scope: instances.scopes.global,
|
||||
});
|
||||
|
||||
+10
-3
@@ -33,15 +33,22 @@ module(
|
||||
};
|
||||
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
store = this.owner.lookup('service:store');
|
||||
controller = this.owner.lookup(
|
||||
'controller:scopes/scope/roles/role/manage-scopes/index',
|
||||
);
|
||||
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.global = this.server.create(
|
||||
'scope',
|
||||
{ id: 'global' },
|
||||
'withGlobalAuth',
|
||||
);
|
||||
await authenticateSession({
|
||||
isGlobal: true,
|
||||
account_id: this.server.schema.accounts.first().id,
|
||||
});
|
||||
instances.role = this.server.create('role', {
|
||||
scopeId: 'global',
|
||||
scope: instances.scopes.global,
|
||||
grant_scope_ids: [],
|
||||
});
|
||||
|
||||
|
||||
+5
-3
@@ -22,7 +22,6 @@ module(
|
||||
|
||||
const instances = {
|
||||
scopes: {
|
||||
global: null,
|
||||
org: null,
|
||||
},
|
||||
role: null,
|
||||
@@ -35,13 +34,16 @@ module(
|
||||
};
|
||||
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
store = this.owner.lookup('service:store');
|
||||
controller = this.owner.lookup(
|
||||
'controller:scopes/scope/roles/role/manage-scopes/manage-custom-scopes',
|
||||
);
|
||||
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
this.server.create('scope', { id: 'global' }, 'withGlobalAuth');
|
||||
await authenticateSession({
|
||||
isGlobal: true,
|
||||
account_id: this.server.schema.accounts.first().id,
|
||||
});
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
scope: { id: 'global', type: 'global' },
|
||||
|
||||
+8
-4
@@ -36,15 +36,19 @@ module(
|
||||
};
|
||||
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
store = this.owner.lookup('service:store');
|
||||
controller = this.owner.lookup(
|
||||
'controller:scopes/scope/roles/role/manage-scopes/manage-org-projects',
|
||||
);
|
||||
|
||||
instances.scopes.global = this.server.create('scope', {
|
||||
id: 'global',
|
||||
type: 'global',
|
||||
instances.scopes.global = this.server.create(
|
||||
'scope',
|
||||
{ id: 'global' },
|
||||
'withGlobalAuth',
|
||||
);
|
||||
await authenticateSession({
|
||||
isGlobal: true,
|
||||
account_id: this.server.schema.accounts.first().id,
|
||||
});
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -37,10 +37,17 @@ module('Unit | Controller | scopes/scope/roles/role/scopes', function (hooks) {
|
||||
};
|
||||
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
controller = this.owner.lookup('controller:scopes/scope/roles/role/scopes');
|
||||
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.global = this.server.create(
|
||||
'scope',
|
||||
{ id: 'global' },
|
||||
'withGlobalAuth',
|
||||
);
|
||||
await authenticateSession({
|
||||
isGlobal: true,
|
||||
account_id: this.server.schema.accounts.first().id,
|
||||
});
|
||||
instances.role = this.server.create('role', {
|
||||
scopeId: 'global',
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user