X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Fauth%2FCmsAuthUtils.java;h=e854f5adfcd213bfbf31e2de2f97f3c44247727c;hb=b7683883512d924a039a43c2e1102290aa49f64d;hp=4c09650d4b0546bdc5c6220a23f23de99903cf95;hpb=03f646fd0d7e7ce393694c836c779bc67a4eef55;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms/src/org/argeo/cms/auth/CmsAuthUtils.java b/org.argeo.cms/src/org/argeo/cms/auth/CmsAuthUtils.java index 4c09650d4..e854f5adf 100644 --- a/org.argeo.cms/src/org/argeo/cms/auth/CmsAuthUtils.java +++ b/org.argeo.cms/src/org/argeo/cms/auth/CmsAuthUtils.java @@ -14,6 +14,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.argeo.api.NodeConstants; +import org.argeo.api.cms.CmsSession; +import org.argeo.api.cms.CmsSessionId; import org.argeo.api.security.AnonymousPrincipal; import org.argeo.api.security.DataAdminPrincipal; import org.argeo.api.security.NodeSecurityUtils; @@ -186,7 +188,7 @@ class CmsAuthUtils { } } - public static CmsSession cmsSessionFromHttpSession(BundleContext bc, String httpSessionId) { + public static CmsSessionImpl cmsSessionFromHttpSession(BundleContext bc, String httpSessionId) { Authorization authorization = null; Collection> sr; try { @@ -195,9 +197,9 @@ class CmsAuthUtils { } catch (InvalidSyntaxException e) { throw new IllegalArgumentException("Cannot get CMS session for id " + httpSessionId, e); } - CmsSession cmsSession; + CmsSessionImpl cmsSession; if (sr.size() == 1) { - cmsSession = bc.getService(sr.iterator().next()); + cmsSession = (CmsSessionImpl) bc.getService(sr.iterator().next()); // locale = cmsSession.getLocale(); authorization = cmsSession.getAuthorization(); if (authorization.getName() == null)