From f633233a41c8ebae943e27e33596f7c2ba7bb76c Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Wed, 27 Jul 2022 06:58:03 +0200 Subject: [PATCH] Inject CMS context --- .../src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/swt/rap/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java b/swt/rap/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java index cda9a117f..5947a2927 100644 --- a/swt/rap/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java +++ b/swt/rap/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java @@ -4,11 +4,13 @@ import java.security.AccessController; import java.util.UUID; import java.util.concurrent.Callable; +import javax.inject.Inject; import javax.security.auth.Subject; import javax.security.auth.login.LoginContext; import javax.security.auth.login.LoginException; import org.argeo.api.cms.CmsAuth; +import org.argeo.api.cms.CmsContext; import org.argeo.api.cms.CmsLog; import org.argeo.api.cms.ux.CmsImageManager; import org.argeo.api.cms.ux.CmsView; @@ -35,6 +37,9 @@ import org.osgi.service.event.EventHandler; public class CmsLoginLifecycle implements CmsView { private final static CmsLog log = CmsLog.getLog(CmsLoginLifecycle.class); + @Inject + private CmsContext cmsContext; + private UxContext uxContext; private CmsImageManager imageManager; @@ -63,8 +68,7 @@ public class CmsLoginLifecycle implements CmsView { Subject subject = Subject.getSubject(AccessController.getContext()); Display display = Display.getCurrent(); // UiContext.setData(CmsView.KEY, this); - // FIXME get CMS context - CmsLoginShell loginShell = new CmsLoginShell(this, null); + CmsLoginShell loginShell = new CmsLoginShell(this, cmsContext); CmsSwtUtils.registerCmsView(loginShell.getShell(), this); loginShell.setSubject(subject); try { -- 2.30.2