Improve CmsView capabilities.
[lgpl/argeo-commons.git] / org.argeo.cms.ui.rap / src / org / argeo / cms / web / CmsWebEntryPoint.java
index 2961eead9c386951f21b2156d62f909a77f6b90b..62786f5afa0e477a180db2547792514feda3df62 100644 (file)
@@ -39,6 +39,7 @@ import org.osgi.service.event.Event;
 import org.osgi.service.event.EventAdmin;
 
 /** The {@link CmsView} for a {@link CmsWebApp}. */
+@SuppressWarnings("restriction")
 public class CmsWebEntryPoint implements EntryPoint, CmsView, BrowserNavigationListener {
        private static final long serialVersionUID = 7733510691684570402L;
        private final static Log log = LogFactory.getLog(CmsWebEntryPoint.class);
@@ -116,6 +117,10 @@ public class CmsWebEntryPoint implements EntryPoint, CmsView, BrowserNavigationL
                return loginContext.getSubject();
        }
 
+       public <T> T doAs(PrivilegedAction<T> action) {
+               return Subject.doAs(getSubject(), action);
+       }
+
        @Override
        public boolean isAnonymous() {
                return CurrentUser.isAnonymous(getSubject());