Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2013-10-09 21:24:38 +0000
committerChristian W. Damus2013-10-09 21:27:25 +0000
commit47ce267ad11c9df95fd1d53b879df447a5d4be37 (patch)
tree36ed140f943fe27b153bc523aeffaea3eeff54dc /extraplugins
parent5bc6d028c6fa4070de87ca818d8674bbf273d27a (diff)
downloadorg.eclipse.papyrus-47ce267ad11c9df95fd1d53b879df447a5d4be37.tar.gz
org.eclipse.papyrus-47ce267ad11c9df95fd1d53b879df447a5d4be37.tar.xz
org.eclipse.papyrus-47ce267ad11c9df95fd1d53b879df447a5d4be37.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