]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditor.java
Improve dist UI
[gpl/argeo-slc.git] / plugins / org.argeo.slc.client.ui.dist / src / main / java / org / argeo / slc / client / ui / dist / editors / DistributionEditor.java
index 35eb045bc0de6c2fd75e4c2fcd696e7600384e10..4fd85c2c20b4a458f87a0e5c8770db75f7c517cb 100644 (file)
@@ -15,6 +15,8 @@
  */
 package org.argeo.slc.client.ui.dist.editors;
 
+import javax.jcr.Credentials;
+import javax.jcr.GuestCredentials;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
@@ -43,7 +45,8 @@ public class DistributionEditor extends FormEditor implements SlcNames {
                        throws PartInitException {
                DistributionEditorInput dei = (DistributionEditorInput) input;
                try {
-                       session = dei.getRepository().login(dei.getWorkspaceName());
+                       session = dei.getRepository().login(dei.getCredentials(),
+                                       dei.getWorkspaceName());
                } catch (RepositoryException e) {
                        throw new PartInitException("Cannot log to workspace "
                                        + dei.getWorkspaceName(), e);
@@ -55,8 +58,8 @@ public class DistributionEditor extends FormEditor implements SlcNames {
        @Override
        protected void addPages() {
                try {
-                       addPage(new DistributionOverviewPage(this, "Overview", session));
                        addPage(new ArtifactsBrowserPage(this, "Browser", session));
+                       addPage(new DistributionOverviewPage(this, "Overview", session));
                } catch (PartInitException e) {
                        throw new ArgeoException("Cannot add distribution editor pages", e);
                }