From 7c578d14d9d74524f76277025a666c04dc3645e0 Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Thu, 10 Oct 2024 00:33:35 +0800 Subject: [PATCH 1/3] added ability to manually verify user from IAM users mgmt --- addon/controllers/users/index.js | 32 +++++++++++++++++++++++++++++++- package.json | 6 +++--- translations/en-us.yaml | 4 ++++ 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/addon/controllers/users/index.js b/addon/controllers/users/index.js index 05b456e..e694dca 100644 --- a/addon/controllers/users/index.js +++ b/addon/controllers/users/index.js @@ -178,6 +178,13 @@ export default class UsersIndexController extends Controller { permission: 'iam activate user', isVisible: (user) => user.get('session_status') === 'inactive' || (this.currentUser.user.is_admin && user.get('session_status') === 'pending'), }, + { + label: this.intl.t('iam.users.index.verify-user'), + fn: this.verifyUser, + className: 'text-danger', + permission: 'iam verify user', + isVisible: (user) => !user.get('email_verified_at'), + }, { label: this.intl.t('iam.users.index.delete-user'), fn: this.deleteUser, @@ -402,7 +409,7 @@ export default class UsersIndexController extends Controller { } /** - * Deactivates a user + * Activate a user * * @void */ @@ -424,6 +431,29 @@ export default class UsersIndexController extends Controller { }); } + /** + * Verify a user + * + * @void + */ + @action verifyUser(user) { + this.modalsManager.confirm({ + title: this.intl.t('iam.users.index.verify-user-title', { userName: user.get('name') }), + body: this.intl.t('iam.users.index.verify-user-manually-prompt'), + confirm: async (modal) => { + modal.startLoading(); + try { + await user.verify(); + this.notifications.success(this.intl.t('iam.users.index.user-verified-success-message', { userName: user.get('name') })); + this.hostRouter.refresh(); + } catch (error) { + this.notifications.serverError(error); + modal.stopLoading(); + } + }, + }); + } + /** * Resends invite for a user to join. * diff --git a/package.json b/package.json index bff9dda..0d058f0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fleetbase/iam-engine", - "version": "0.1.1", + "version": "0.1.2", "description": "Fleetbase IAM extension provides identity and access management module for managing users, permissions and policies.", "fleetbase": { "route": "iam" @@ -41,8 +41,8 @@ "publish:github": "npm config set '@fleetbase:registry' https://npm.pkg.github.com/ && npm publish" }, "dependencies": { - "@fleetbase/ember-core": "^0.2.19", - "@fleetbase/ember-ui": "^0.2.32", + "@fleetbase/ember-core": "^0.2.21", + "@fleetbase/ember-ui": "^0.2.34", "@babel/core": "^7.23.2", "ember-cli-babel": "^8.2.0", "ember-cli-htmlbars": "^6.3.0", diff --git a/translations/en-us.yaml b/translations/en-us.yaml index fa1f687..2e4d979 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -129,6 +129,9 @@ iam: deactivate-user-success-message: User {userName} deactivated. re-activate-user-title: Re-activate {userName} user's account re-activate-user-success-message: User {userName} activated. + verify-user-title: Manually Verify user {userName} account + verify-user-manually-prompt: By clicking confirm this action will manually verify the users email address. Are you sure you want to bypass verification for this user? + user-verified-success-message: User {userName} verified. delete-users: Delete Users last-login: Last Login created-at: Created At @@ -140,6 +143,7 @@ iam: deactivate-user: Deactivate user... activate-user: Activate user... delete-user: Delete user... + verify-user: Verify user... new-user: New User user-invited-join-your-organization-success: User has been invited to join your organization. edit-user-title: Edit User From a7d6ee43a091e01e7f0aff1fd8c5752191dc2cba Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Thu, 10 Oct 2024 00:38:06 +0800 Subject: [PATCH 2/3] updated lockfile --- pnpm-lock.yaml | 66 +++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0fa3099..e934e1a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,11 +15,11 @@ importers: specifier: ^7.23.2 version: 7.23.2 '@fleetbase/ember-core': - specifier: ^0.2.19 - version: 0.2.19(@ember/string@3.1.1)(@ember/test-helpers@3.2.0(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(webpack@5.89.0))(ember-resolver@11.0.1(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0)))(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(webpack@5.89.0) + specifier: ^0.2.21 + version: 0.2.21(@ember/string@3.1.1)(@ember/test-helpers@3.2.0(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(webpack@5.89.0))(ember-resolver@11.0.1(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0)))(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(webpack@5.89.0) '@fleetbase/ember-ui': - specifier: ^0.2.32 - version: 0.2.32(@ember/test-helpers@3.2.0(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(webpack@5.89.0))(@glimmer/component@1.1.2(@babel/core@7.23.2))(@glimmer/tracking@1.1.2)(ember-resolver@11.0.1(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0)))(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(postcss@8.4.35)(rollup@2.79.1)(tracked-built-ins@3.3.0)(webpack@5.89.0) + specifier: ^0.2.34 + version: 0.2.34(@ember/test-helpers@3.2.0(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(webpack@5.89.0))(@glimmer/component@1.1.2(@babel/core@7.23.2))(@glimmer/tracking@1.1.2)(ember-resolver@11.0.1(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0)))(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(postcss@8.4.35)(rollup@2.79.1)(tracked-built-ins@3.3.0)(webpack@5.89.0) '@fortawesome/ember-fontawesome': specifier: ^2.0.0 version: 2.0.0(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(rollup@2.79.1)(webpack@5.89.0) @@ -1450,12 +1450,12 @@ packages: peerDependencies: ember-source: '>= 4.0.0' - '@fleetbase/ember-core@0.2.19': - resolution: {integrity: sha512-xXRBp+dqZ975bPyAxvxlw1K+kcVxu1XZ9/Db+eySNPS2ua+wswg8+KyegnU6hkJflDgFjo7xTqBL30WVrjRUiQ==} + '@fleetbase/ember-core@0.2.21': + resolution: {integrity: sha512-Jwe4ME+cJp24Oaf6wfd1QJK6g3D6/Ff+qUMinJ40yoMImpo3zKA+IAxfQSBPIf+9BrmNG31wquTz4WR7Um47LQ==} engines: {node: '>= 18'} - '@fleetbase/ember-ui@0.2.32': - resolution: {integrity: sha512-+6lPyziomGKA405ILe6DSY9tBfehMTO1pSpe/8ZUQrez06wda6Ci4C2DCNd5vWmOlOtiC91cRKLUcN6Myx9dwQ==} + '@fleetbase/ember-ui@0.2.34': + resolution: {integrity: sha512-9uLCufgIaMFgGR+G4m73shaiRz+F16CDs7jj4jFzQGSUQByaBcbSetiMoGXSnx+3IncaKAn8rjAVPd+QrDDRMg==} engines: {node: '>= 18'} '@fleetbase/intl-lint@0.0.1': @@ -9950,9 +9950,9 @@ snapshots: '@csstools/postcss-cascade-layers@4.0.6(postcss@8.4.35)': dependencies: - '@csstools/selector-specificity': 3.1.1(postcss-selector-parser@6.1.0) + '@csstools/selector-specificity': 3.1.1(postcss-selector-parser@6.1.2) postcss: 8.4.35 - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 '@csstools/postcss-color-function@3.0.19(postcss@8.4.35)': dependencies: @@ -10031,9 +10031,9 @@ snapshots: '@csstools/postcss-is-pseudo-class@4.0.8(postcss@8.4.35)': dependencies: - '@csstools/selector-specificity': 3.1.1(postcss-selector-parser@6.1.0) + '@csstools/selector-specificity': 3.1.1(postcss-selector-parser@6.1.2) postcss: 8.4.35 - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 '@csstools/postcss-light-dark-function@1.0.8(postcss@8.4.35)': dependencies: @@ -10118,7 +10118,7 @@ snapshots: '@csstools/postcss-scope-pseudo-class@3.0.1(postcss@8.4.35)': dependencies: postcss: 8.4.35 - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 '@csstools/postcss-stepped-value-functions@3.0.10(postcss@8.4.35)': dependencies: @@ -10144,17 +10144,17 @@ snapshots: dependencies: postcss: 8.4.35 - '@csstools/selector-resolve-nested@1.1.0(postcss-selector-parser@6.1.0)': + '@csstools/selector-resolve-nested@1.1.0(postcss-selector-parser@6.1.2)': dependencies: - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 '@csstools/selector-specificity@3.0.1(postcss-selector-parser@6.0.15)': dependencies: postcss-selector-parser: 6.0.15 - '@csstools/selector-specificity@3.1.1(postcss-selector-parser@6.1.0)': + '@csstools/selector-specificity@3.1.1(postcss-selector-parser@6.1.2)': dependencies: - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 '@csstools/utilities@1.0.0(postcss@8.4.35)': dependencies: @@ -10569,7 +10569,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@fleetbase/ember-core@0.2.19(@ember/string@3.1.1)(@ember/test-helpers@3.2.0(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(webpack@5.89.0))(ember-resolver@11.0.1(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0)))(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(webpack@5.89.0)': + '@fleetbase/ember-core@0.2.21(@ember/string@3.1.1)(@ember/test-helpers@3.2.0(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(webpack@5.89.0))(ember-resolver@11.0.1(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0)))(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(webpack@5.89.0)': dependencies: '@babel/core': 7.25.2 compress-json: 3.1.0 @@ -10602,7 +10602,7 @@ snapshots: - utf-8-validate - webpack - '@fleetbase/ember-ui@0.2.32(@ember/test-helpers@3.2.0(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(webpack@5.89.0))(@glimmer/component@1.1.2(@babel/core@7.23.2))(@glimmer/tracking@1.1.2)(ember-resolver@11.0.1(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0)))(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(postcss@8.4.35)(rollup@2.79.1)(tracked-built-ins@3.3.0)(webpack@5.89.0)': + '@fleetbase/ember-ui@0.2.34(@ember/test-helpers@3.2.0(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(webpack@5.89.0))(@glimmer/component@1.1.2(@babel/core@7.23.2))(@glimmer/tracking@1.1.2)(ember-resolver@11.0.1(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0)))(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0))(postcss@8.4.35)(rollup@2.79.1)(tracked-built-ins@3.3.0)(webpack@5.89.0)': dependencies: '@babel/core': 7.25.2 '@ember/render-modifiers': 2.1.0(@babel/core@7.25.2)(ember-source@5.4.0(@babel/core@7.23.2)(@glimmer/component@1.1.2(@babel/core@7.23.2))(rsvp@4.8.5)(webpack@5.89.0)) @@ -13379,7 +13379,7 @@ snapshots: css-blank-pseudo@6.0.2(postcss@8.4.35): dependencies: postcss: 8.4.35 - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 css-color-converter@2.0.0: dependencies: @@ -13391,9 +13391,9 @@ snapshots: css-has-pseudo@6.0.5(postcss@8.4.35): dependencies: - '@csstools/selector-specificity': 3.1.1(postcss-selector-parser@6.1.0) + '@csstools/selector-specificity': 3.1.1(postcss-selector-parser@6.1.2) postcss: 8.4.35 - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 postcss-value-parser: 4.2.0 css-loader@5.2.7(webpack@5.89.0): @@ -17683,7 +17683,7 @@ snapshots: postcss-attribute-case-insensitive@6.0.3(postcss@8.4.35): dependencies: postcss: 8.4.35 - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 postcss-clamp@4.1.0(postcss@8.4.35): dependencies: @@ -17740,12 +17740,12 @@ snapshots: '@csstools/css-parser-algorithms': 2.7.1(@csstools/css-tokenizer@2.4.1) '@csstools/css-tokenizer': 2.4.1 postcss: 8.4.35 - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 postcss-dir-pseudo-class@8.0.1(postcss@8.4.35): dependencies: postcss: 8.4.35 - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 postcss-double-position-gradients@5.0.7(postcss@8.4.35): dependencies: @@ -17762,12 +17762,12 @@ snapshots: postcss-focus-visible@9.0.1(postcss@8.4.35): dependencies: postcss: 8.4.35 - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 postcss-focus-within@8.0.1(postcss@8.4.35): dependencies: postcss: 8.4.35 - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 postcss-font-variant@5.0.0(postcss@8.4.35): dependencies: @@ -17852,10 +17852,10 @@ snapshots: postcss-nesting@12.1.5(postcss@8.4.35): dependencies: - '@csstools/selector-resolve-nested': 1.1.0(postcss-selector-parser@6.1.0) - '@csstools/selector-specificity': 3.1.1(postcss-selector-parser@6.1.0) + '@csstools/selector-resolve-nested': 1.1.0(postcss-selector-parser@6.1.2) + '@csstools/selector-specificity': 3.1.1(postcss-selector-parser@6.1.2) postcss: 8.4.35 - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 postcss-opacity-percentage@2.0.0(postcss@8.4.35): dependencies: @@ -17943,7 +17943,7 @@ snapshots: postcss-pseudo-class-any-link@9.0.2(postcss@8.4.35): dependencies: postcss: 8.4.35 - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 postcss-replace-overflow-wrap@4.0.0(postcss@8.4.35): dependencies: @@ -17958,7 +17958,7 @@ snapshots: postcss-selector-not@7.0.2(postcss@8.4.35): dependencies: postcss: 8.4.35 - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 postcss-selector-parser@6.0.15: dependencies: @@ -19199,7 +19199,7 @@ snapshots: postcss-js: 4.0.1(postcss@8.4.35) postcss-load-config: 4.0.2(postcss@8.4.35) postcss-nested: 6.2.0(postcss@8.4.35) - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 resolve: 1.22.8 sucrase: 3.35.0 transitivePeerDependencies: From 948a2ba50127d060b44862a8b0920eb02c6ec3d7 Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Thu, 10 Oct 2024 00:41:28 +0800 Subject: [PATCH 3/3] fix env --- config/environment.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config/environment.js b/config/environment.js index 0dc6530..12a93bb 100644 --- a/config/environment.js +++ b/config/environment.js @@ -6,12 +6,6 @@ module.exports = function (environment) { modulePrefix: name, environment, mountedEngineRoutePrefix: getMountedEngineRoutePrefix(), - - 'ember-leaflet': { - excludeCSS: true, - excludeJS: true, - excludeImages: true, - }, }; return ENV;