*
* @return true, if checks if is authorized
*/
public boolean isAuthorized(String token,String userId, String idFolder, String state) {
logger.debug("IN");
Monitor monitor =MonitorFactory.start("spagobi.service.security.isAuthorized");
try {
validateTicket(token, userId);
SpagoBIUserProfile profile= supplier.createUserProfile(userId);
profile.setFunctions(UserUtilities.readFunctionality(profile.getRoles()));
UserProfile userProfile=new UserProfile(profile);
return ObjectsAccessVerifier.canExec(new Integer(idFolder), userProfile);
} catch (SecurityException e) {
logger.error("SecurityException", e);
return false;
} finally {
monitor.stop();
logger.debug("OUT");
}
}