String idFunctStr = (String) request.getAttribute(ObjectsTreeConstants.FUNCT_ID);
if (idFunctStr != null) {
Integer idFunct = new Integer(idFunctStr);
if (profile.isAbleToExecuteAction(SpagoBIConstants.DOCUMENT_MANAGEMENT_ADMIN)) {
// deletes the document from the specified folder, no matter the permissions
objdao.eraseBIObject(obj, idFunct);
} else {
// deletes the document from the specified folder if the profile is a developer for that folder
if (ObjectsAccessVerifier.canDev(obj.getStateCode(), idFunct, profile)) {
objdao.eraseBIObject(obj, idFunct);
}