This is an automated email from the ASF dual-hosted git repository.

DaanHoogland pushed a commit to branch ghi13975-add-account-ux
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 1b04b97a95bf1a9a724d177bdb061e0ed0ce37b9
Author: Daan Hoogland <[email protected]>
AuthorDate: Wed Aug 26 14:29:38 2026 +0200

    new tenant instead of add account
---
 ui/public/locales/en.json        |  2 ++
 ui/src/config/section/account.js | 14 +++++++++++++-
 ui/src/views/iam/AddAccount.vue  |  7 +++++++
 ui/src/views/iam/AddUser.vue     | 10 ++++++++--
 4 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json
index f57460efa48..4587e2c198f 100644
--- a/ui/public/locales/en.json
+++ b/ui/public/locales/en.json
@@ -264,6 +264,7 @@
 "label.add": "Add",
 "label.addservices": "Add Services",
 "label.add.account": "Add Account",
+"label.add.new.tenant.account": "New Tenant Account",
 "label.add.acl.rule": "Add rule",
 "label.add.acl": "Add ACL",
 "label.add.affinity.group": "Add new Affinity Group",
@@ -3225,6 +3226,7 @@
 "message.action.vmsnapshot.delete": "Please confirm that you want to delete 
this Instance Snapshot. <br>Please notice that the Instance will be paused 
before the Snapshot deletion, and resumed after deletion, if it runs on KVM.",
 "message.action.vmsnapshot.disk-only.delete": "Please confirm that you want to 
delete this Instance Snapshot.",
 "message.activate.project": "Are you sure you want to activate this project?",
+"message.add.account.warning": "Creating a new account creates a separate 
tenant with its own resource limits and isolated resources. Users in different 
accounts cannot share Instances or Volumes. Networks can be shared between 
accounts when the appropriate permissions are granted. To add a new user to an 
existing account instead, use the <b>Add User</b> action from the account's 
list or details view.",
 "message.add.custom.action.parameters": "Parameters to be made available while 
running the custom action.",
 "message.add.egress.rule.failed": "Adding new egress rule failed.",
 "message.add.egress.rule.processing": "Adding new egress rule...",
diff --git a/ui/src/config/section/account.js b/ui/src/config/section/account.js
index 5766fd8a0f9..ed0bed48831 100644
--- a/ui/src/config/section/account.js
+++ b/ui/src/config/section/account.js
@@ -104,11 +104,23 @@ export default {
     {
       api: 'createAccount',
       icon: 'plus-outlined',
-      label: 'label.add.account',
+      label: 'label.add.new.tenant.account',
       listView: true,
       popup: true,
       component: shallowRef(defineAsyncComponent(() => 
import('@/views/iam/AddAccount.vue')))
     },
+    {
+      api: 'createUser',
+      icon: 'usergroup-add-outlined',
+      label: 'label.add.user',
+      listView: true,
+      dataView: true,
+      popup: true,
+      show: (record, store) => {
+        return ['Admin', 'DomainAdmin'].includes(store.userInfo.roletype) && 
record.state === 'enabled'
+      },
+      component: shallowRef(defineAsyncComponent(() => 
import('@/views/iam/AddUser.vue')))
+    },
     {
       api: 'ldapCreateAccount',
       icon: 'user-add-outlined',
diff --git a/ui/src/views/iam/AddAccount.vue b/ui/src/views/iam/AddAccount.vue
index a211fd2d8c3..5c0b7e14110 100644
--- a/ui/src/views/iam/AddAccount.vue
+++ b/ui/src/views/iam/AddAccount.vue
@@ -25,6 +25,13 @@
         :loading="loading"
         layout="vertical"
         @finish="handleSubmit">
+        <div style="margin-bottom: 10px">
+          <a-alert type="warning">
+            <template #message>
+              <div v-html="$t('message.add.account.warning')"></div>
+            </template>
+          </a-alert>
+        </div>
         <a-form-item ref="roleid" name="roleid">
           <template #label>
             <tooltip-label :title="$t('label.role')" 
:tooltip="apiParams.roleid.description"/>
diff --git a/ui/src/views/iam/AddUser.vue b/ui/src/views/iam/AddUser.vue
index 704c55c4814..956bfe177f5 100644
--- a/ui/src/views/iam/AddUser.vue
+++ b/ui/src/views/iam/AddUser.vue
@@ -185,6 +185,12 @@ export default {
     ResourceIcon,
     InfiniteScrollSelect
   },
+  props: {
+    resource: {
+      type: Object,
+      default: () => {}
+    }
+  },
   data () {
     this.fetchTimeZone = debounce(this.fetchTimeZone, 800)
     return {
@@ -247,8 +253,8 @@ export default {
       })
     },
     fetchData () {
-      this.account = this.$route.query && this.$route.query.account ? 
this.$route.query.account : null
-      this.domainid = this.$route.query && this.$route.query.domainid ? 
this.$route.query.domainid : null
+      this.account = (this.$route.query && this.$route.query.account) || 
this.resource?.name || null
+      this.domainid = (this.$route.query && this.$route.query.domainid) || 
this.resource?.domainid || null
       // Set initial domain if provided from route
       if (this.domainid) {
         this.form.domainid = this.domainid

Reply via email to