You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2014/02/14 03:18:13 UTC
git commit: updated refs/heads/rbac to 4b75fa8
Updated Branches:
refs/heads/rbac 8072e5084 -> 4b75fa806
Fix a NPE bug in listAclPolicies.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4b75fa80
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4b75fa80
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4b75fa80
Branch: refs/heads/rbac
Commit: 4b75fa806ab2d6394a34eabe05aa9fd3c96990c1
Parents: 8072e50
Author: Min Chen <mi...@citrix.com>
Authored: Thu Feb 13 17:57:49 2014 -0800
Committer: Min Chen <mi...@citrix.com>
Committed: Thu Feb 13 17:57:49 2014 -0800
----------------------------------------------------------------------
.../src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4b75fa80/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java b/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java
index da655b8..e2704d8 100644
--- a/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java
+++ b/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java
@@ -469,8 +469,12 @@ public class AclApiServiceImpl extends ManagerBase implements AclApiService, Man
for (AclPolicyPermission permission : permissions) {
AclPermissionResponse perm = new AclPermissionResponse();
perm.setAction(permission.getAction());
- perm.setEntityType(AclEntityType.valueOf(permission.getEntityType()));
- perm.setScope(PermissionScope.valueOf(permission.getScope()));
+ if (permission.getEntityType() != null) {
+ perm.setEntityType(AclEntityType.valueOf(permission.getEntityType()));
+ }
+ if (permission.getScope() != null) {
+ perm.setScope(PermissionScope.valueOf(permission.getScope()));
+ }
perm.setScopeId(permission.getScopeId());
perm.setPermission(permission.getPermission());
response.addPermission(perm);