Improve security
[lgpl/argeo-commons.git] / security / plugins / org.argeo.security.ui.application / src / main / java / org / argeo / security / ui / application / AbstractSecureApplication.java
index a0a2f922bbe31bc16384c087a80cf64c613582ff..9550660004fbb22a4c9376c3ca42ae3c4073195d 100644 (file)
@@ -16,13 +16,16 @@ import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.application.WorkbenchAdvisor;
 
+/**
+ * Common base class for authenticated access to the Eclipse UI framework (RAP and
+ * RCP)
+ */
 public abstract class AbstractSecureApplication implements IApplication {
        private static final Log log = LogFactory
                        .getLog(AbstractSecureApplication.class);
 
        protected abstract WorkbenchAdvisor createWorkbenchAdvisor();
 
-       @SuppressWarnings("unchecked")
        public Object start(IApplicationContext context) throws Exception {
 
                Integer returnCode = null;
@@ -51,8 +54,7 @@ public abstract class AbstractSecureApplication implements IApplication {
                                ErrorDialog.openError(null, "Error", "Shutdown...", status);
                                return status.getSeverity();
                        }
-                       if (log.isDebugEnabled())
-                               log.debug("Logged in as " + username);
+
                        returnCode = (Integer) Subject.doAs(subject, getRunAction(display));
                        SecureApplicationActivator.getLoginContext().logout();
                        return processReturnCode(returnCode);