*/
public void testGetPermissionsForUser() throws Exception
{
PermissionManagement service = getService();
Permission permission = null;
HashMap map = new HashMap();
JetspeedSecurityCache.loadRolePermissions();
try
{
Iterator permissions = service.getPermissions("user");
while (permissions.hasNext())
{
permission = (Permission)permissions.next();
map.put(permission.getName(), permission);
}
assertTrue(map.get("view") != null);
assertTrue(map.get("customize") != null);
assertTrue(map.get("close") == null);
map.clear();
permissions = service.getPermissions("admin");
while (permissions.hasNext())
{
permission = (Permission)permissions.next();
map.put(permission.getName(), permission);
}
assertTrue(map.get("view") != null);
assertTrue(map.get("customize") != null);
assertTrue(map.get("close") != null);