public void removeUserFromGroup(String user, String group) throws ApiSenderException { DebugUtils.Assert(account != null, "please call createAccount() before createPolicy()"); UserInventory u = users.get(user); UserGroupInventory g = groups.get(group); DebugUtils.Assert(u != null, String.format("cannot find user[%s]", user)); DebugUtils.Assert(g != null, String.format("cannot find group[%s]", group)); api.removeUserFromGroup(u.getUuid(), g.getUuid(), accountSession); }
public void detachPolicyFromGroup(String group, String policy) throws ApiSenderException { DebugUtils.Assert(account != null, "please call createAccount() before createPolicy()"); PolicyInventory p = policies.get(policy); DebugUtils.Assert(p != null, String.format("cannot find policy[%s]", policy)); UserGroupInventory g = groups.get(group); DebugUtils.Assert(g != null, String.format("cannot find group[%s]", group)); api.detachPolicyFromGroup(g.getUuid(), p.getUuid(), accountSession); }
public void deleteGroup(String group) throws ApiSenderException { DebugUtils.Assert(account != null, "please call createAccount() before createPolicy()"); UserGroupInventory g = groups.get(group); DebugUtils.Assert(g != null, String.format("cannot find group[%s]", group)); api.deleteGroup(g.getUuid(), accountSession); }