Rename CmsSession into CmsView, and make it exclusively related to the Display (and...
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / util / CurrentUserUtils.java
index a47cad0e873fab1e711c100efcd0c8f2b8536386..0ebac9dcc216536de5f1d1b830895193c89250c5 100644 (file)
@@ -26,7 +26,6 @@ import javax.security.auth.Subject;
 import javax.security.auth.x500.X500Principal;
 
 import org.argeo.ArgeoException;
-import org.argeo.cms.CmsSession;
 
 /**
  * Retrieves information about the current user. Not an API, can change without
@@ -59,7 +58,7 @@ class CurrentUserUtils {
        public final static Subject getSubject() {
                Subject subject = Subject.getSubject(AccessController.getContext());
                if (subject == null) {
-                       subject = CmsSession.current.get().getSubject();
+                       subject = CmsUtils.getCmsView().getSubject();
                        if (subject == null)
                                throw new ArgeoException("Not authenticated.");
                }