-
修改org.saiku.web.service.SessionService.java
public Map<String, Object> login(HttpServletRequest req, String username, String password ) throws LicenseException {
// Object sl = null;
// String notice = null;
HttpSession session = ((HttpServletRequest)req).getSession(true);
session.getId();
sessionRepo.setSession(session);
// try {
// sl = l.getLicense();
// } catch (Exception e) {
// log.debug("Could not process license", e);
// throw new LicenseException("Error fetching license. Get a free license from http://licensing.meteorite.bi. You can upload it at /upload.html");
// }
// if (sl != null) {
if (true) {
// try {
// l.validateLicense();
// } catch (RepositoryException | IOException | ClassNotFoundException e) {
// log.debug("Repository Exception, couldn't get license", e);
// throw new LicenseException("Error fetching license. Please check your logs.");
// }
// if (l.getLicense() instanceof SaikuLicense2) {
if (true) {
if (authenticationManager != null) {
authenticate(req, username, password);
}
if (SecurityContextHolder.getContext() != null
&& SecurityContextHolder.getContext().getAuthentication() != null) {
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
if (authorisationPredicate.isAuthorised(auth)) {
Object p = auth.getPrincipal();
createSession(auth, username, password);
return sessionHolder.get(p);
} else {
log.in