try {
logger.debug("IN: obj label = [" + obj.getLabel() + "]; user id = [" + ((UserProfile) profile).getUserId() + "]");
// if user is administrator, he can develop, no need to make any query to database
if (profile.isAbleToExecuteAction(SpagoBIConstants.DOCUMENT_MANAGEMENT_ADMIN)) {
logger.debug("User [" + ((UserProfile) profile).getUserId() + "] is administrator. He can develop every document");
monitor.stop();
return true;
}
// if user is not an administrator and document is not in DEV state, document cannot be developed
if (!"DEV".equals(obj.getStateCode())) {
logger.debug("User [" + ((UserProfile) profile).getUserId() + "] is not an administrator and document is not in DEV state, so it cannot be developed");