{
try
{
String type = getActionParameter(requestContext, "type");
if (type == null)
throw new AJAXException("Missing 'type' parameter");
String resource = getActionParameter(requestContext, "resource");
if (resource == null)
throw new AJAXException("Missing 'resource' parameter");
String actions = getActionParameter(requestContext, "actions");
if (actions == null)
throw new AJAXException("Missing 'actions' parameter");
Permission permission = createPermissionFromClass(type, resource, actions);
if (pm.permissionExists(permission))
{
pm.removePermission(permission);
return 1;
}
return 0;
}
catch (SecurityException e)
{
throw new AJAXException(e.toString(), e);
}
}