Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2013-10-09 21:24:38 +0000
committerChristian W. Damus2013-10-15 13:27:33 +0000
commit26194d20dd0ae15460ab1320a61650c4ad1a0171 (patch)
tree463263002ada8923be88a6d54452b6896db9b9d3 /extraplugins
parent78e8876fb959f3f960f162b43fa4ea596a1a115a (diff)
downloadorg.eclipse.papyrus-26194d20dd0ae15460ab1320a61650c4ad1a0171.tar.gz
org.eclipse.papyrus-26194d20dd0ae15460ab1320a61650c4ad1a0171.tar.xz
org.eclipse.papyrus-26194d20dd0ae15460ab1320a61650c4ad1a0171.zip
415375: [CDO] Model repository administration
https://bugs.eclipse.org/bugs/show_bug.cgi?id=415375 Correct handling of filtering out of resources queried from the server for presentation in the Model Repositories View that are in folders that the current user has no read permission on.
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/cdo/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/PapyrusRepository.java2
-rw-r--r--extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIResourceQuery.java8
2 files changed, 9 insertions, 1 deletions
diff --git a/extraplugins/cdo/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/PapyrusRepository.java b/extraplugins/cdo/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/PapyrusRepository.java
index 23bc477a31a..fd19e6edf68 100644
--- a/extraplugins/cdo/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/PapyrusRepository.java
+++ b/extraplugins/cdo/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/PapyrusRepository.java
@@ -692,6 +692,8 @@ public class PapyrusRepository extends Container<CDOResourceNode> implements IIn
if((view != null) && !view.isClosed()) {
result = view.getRootResource();
}
+ } else if(adapter == CDOSession.class) {
+ result = getCDOSession();
} else {
result = Platform.getAdapterManager().getAdapter(this, adapter);
}
diff --git a/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIResourceQuery.java b/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIResourceQuery.java
index 8feb2644190..9e9e7ae8aa8 100644
--- a/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIResourceQuery.java
+++ b/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIResourceQuery.java
@@ -204,6 +204,7 @@ public class DIResourceQuery {
private IListener createCDOViewListener() {
return new IListener() {
+ @Override
public void notifyEvent(IEvent event) {
if(event instanceof ILifecycleEvent) {
ILifecycleEvent lifecycleEvent = (ILifecycleEvent)event;
@@ -223,6 +224,7 @@ public class DIResourceQuery {
private DisposeListener createViewerDisposeListener() {
return new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
dispose();
}
@@ -274,6 +276,7 @@ public class DIResourceQuery {
if(display != null) {
display.asyncExec(new Runnable() {
+ @Override
public void run() {
if((viewer != null) && (viewer.getControl() != null) && !viewer.getControl().isDisposed()) {
refresh();
@@ -293,7 +296,10 @@ public class DIResourceQuery {
CDOResourceFolder folder = resource.getFolder();
if(folder != null) {
- result = folder.getNodes().contains(resource);
+ // if we don't have read permission on the folder, then we shouldn't attempt to show any contents
+ if(folder.cdoPermission().isReadable()) {
+ result = folder.getNodes().contains(resource);
+ }
} else {
CDOResource root = resource.cdoResource();
if((root != null) && root.isRoot()) {

Back to the top