cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject git commit: updated refs/heads/4.4-forward to be10b32
Date Wed, 23 Apr 2014 01:42:13 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4-forward 3e2c5bb2e -> be10b32b2


CLOUDSTACK-6474: IAM - Not able to list shared networks that is created with scope="all"

Changes:
- On startup the root domain group should be created
- Also the SYSTEM and Root Admin accounts should be added to that group
- This will make sure that the root domain shared network's policy gets attached to the root
domain group


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/be10b32b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/be10b32b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/be10b32b

Branch: refs/heads/4.4-forward
Commit: be10b32b273bed1a1492f02b943b168195e762c0
Parents: 3e2c5bb
Author: Prachi Damle <prachi@cloud.com>
Authored: Tue Apr 22 18:18:44 2014 -0700
Committer: Prachi Damle <prachi@cloud.com>
Committed: Tue Apr 22 18:19:47 2014 -0700

----------------------------------------------------------------------
 .../org/apache/cloudstack/iam/IAMApiServiceImpl.java | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be10b32b/services/iam/plugin/src/org/apache/cloudstack/iam/IAMApiServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/iam/plugin/src/org/apache/cloudstack/iam/IAMApiServiceImpl.java b/services/iam/plugin/src/org/apache/cloudstack/iam/IAMApiServiceImpl.java
index 8b454e0..77e588b 100644
--- a/services/iam/plugin/src/org/apache/cloudstack/iam/IAMApiServiceImpl.java
+++ b/services/iam/plugin/src/org/apache/cloudstack/iam/IAMApiServiceImpl.java
@@ -352,6 +352,21 @@ public class IAMApiServiceImpl extends ManagerBase implements IAMApiService,
Man
         sysAccts.add(Account.ACCOUNT_ID_SYSTEM);
         sysAccts.add(Account.ACCOUNT_ID_SYSTEM + 1);
         _iamSrv.addAccountsToGroup(sysAccts, new Long(Account.ACCOUNT_TYPE_ADMIN + 1));
+
+        // add the root domain group
+        Domain domain = _domainDao.findById(Domain.ROOT_DOMAIN);
+        if (domain != null) {
+            List<IAMGroup> domainGroups = listDomainGroup(domain);
+            if (domainGroups != null && !domainGroups.isEmpty()) {
+                return;
+            }
+            IAMGroup rootDomainGrp = _iamSrv.createIAMGroup("DomainGrp-" + domain.getUuid(),
"Root Domain group",
+                    domain.getPath());
+            // add the system accounts to the root domain group
+            _iamSrv.addAccountsToGroup(sysAccts, rootDomainGrp.getId());
+
+        }
+
     }
 
     private void addDomainWideResourceAccess(Map<String, Object> params) {


Mime
View raw message