Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-10-24 08:39:08 +0000
committerEike Stepper2013-10-24 08:39:08 +0000
commitee878758bbff4a2d719788b20667f8bc759b0f73 (patch)
tree148bb2bffc60c9af457e5ab8ef56780ff9925a45
parentf71c77ce568a0bfbff09920ae7048b2c3f6b1185 (diff)
downloadcdo-ee878758bbff4a2d719788b20667f8bc759b0f73.tar.gz
cdo-ee878758bbff4a2d719788b20667f8bc759b0f73.tar.xz
cdo-ee878758bbff4a2d719788b20667f8bc759b0f73.zip
[419085] [Security] CDOItemProvider raises NoPermissionException on folders
https://bugs.eclipse.org/bugs/show_bug.cgi?id=419085 Guard CDOItemProvider::getChildren() on non-readable CDOResourceFolders as for hasChildren(). Change-Id: I23246370e85909398df8b0c14ab29bfd81a5d678 Signed-off-by: Eike Stepper <stepper@esc-net.de>
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java
index 852d1a74a4..7277905256 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java
@@ -8,6 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
* Victor Roldan Betancort - maintenance
+ * Christian W. Damus (CEA LIST) - 419805
*/
package org.eclipse.emf.cdo.ui;
@@ -180,7 +181,13 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
if (element instanceof CDOResourceFolder)
{
- return ((CDOResourceFolder)element).getNodes().toArray();
+ CDOResourceFolder folder = (CDOResourceFolder)element;
+ if (folder.cdoPermission() == CDOPermission.NONE)
+ {
+ return NO_ELEMENTS;
+ }
+
+ return folder.getNodes().toArray();
}
return super.getChildren(element);

Back to the top