Fixed some bugs encountered in testing iam-plugin apis.

This commit is contained in:
Min Chen 2014-02-14 15:04:29 -08:00
parent 586ee74000
commit ebfe947f41
3 changed files with 13 additions and 3 deletions

View File

@ -16,14 +16,19 @@
// under the License.
package org.apache.cloudstack.iam.api;
public interface AclGroup {
import org.apache.cloudstack.api.Identity;
import org.apache.cloudstack.api.InternalIdentity;
public interface AclGroup extends InternalIdentity, Identity {
String getName();
String getDescription();
@Override
long getId();
@Override
String getUuid();
String getPath();

View File

@ -16,7 +16,10 @@
// under the License.
package org.apache.cloudstack.iam.api;
public interface AclPolicy {
import org.apache.cloudstack.api.Identity;
import org.apache.cloudstack.api.InternalIdentity;
public interface AclPolicy extends InternalIdentity, Identity {
String getName();
@ -26,8 +29,10 @@ public interface AclPolicy {
Static, Dynamic
}
@Override
long getId();
@Override
String getUuid();
String getPath();

View File

@ -651,7 +651,7 @@ public class IAMServiceImpl extends ManagerBase implements IAMService, Manager {
+ "; failed to revoke permission from policy.");
}
// remove entry from acl_entity_permission table
AclPolicyPermissionVO permit = _policyPermissionDao.findByPolicyAndEntity(aclPolicyId, entityType, scope, scopeId, action, null);
AclPolicyPermissionVO permit = _policyPermissionDao.findByPolicyAndEntity(aclPolicyId, entityType, scope, scopeId, action, Permission.Allow);
if (permit != null) {
// not removed yet
_policyPermissionDao.remove(permit.getId());