String inode = UtilMethods.getFileName(new File(FileUtil.getRealPath(assetPath + uri)).getName());
com.dotmarketing.portlets.files.model.File file = fileAPI.find(inode,userAPI.getSystemUser(),false);
if(!Config.getBooleanProperty("ENABLE_SCRIPTING", false)){
throw new DotSecurityException("Last Mod User does not have Scripting Developer role");
}
User mu = userAPI.loadUserById(file.getModUser(), userAPI.getSystemUser(), true);
if(!APILocator.getRoleAPI().doesUserHaveRole(mu, APILocator.getRoleAPI().loadRoleByKey("Scripting Developer"))){
throw new DotSecurityException("Last Mod User does not have Scripting Developer role");
}
FileReader fr = null;
if(!UtilMethods.isSet(realPath)){
fr = new FileReader(FileUtil.getRealPath(assetPath + uri));