Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-09-23 08:33:15 +0000
committerEike Stepper2013-09-23 08:33:15 +0000
commit3899b0d02e1ec67674511c5cfbaf0605f538fa55 (patch)
treeb40082fbfd5c097729feaa3fe5785b0592de634f /plugins/org.eclipse.emf.cdo.security.edit
parentdc8364330b7013c4edd54ef30b9d74f7ad9f234a (diff)
downloadcdo-3899b0d02e1ec67674511c5cfbaf0605f538fa55.tar.gz
cdo-3899b0d02e1ec67674511c5cfbaf0605f538fa55.tar.xz
cdo-3899b0d02e1ec67674511c5cfbaf0605f538fa55.zip
[417483] [Security] Issues in invalidation when missing write Permission
https://bugs.eclipse.org/bugs/show_bug.cgi?id=417483
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.security.edit')
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/plugin.properties20
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ResourceFilterItemProvider.java163
2 files changed, 175 insertions, 8 deletions
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties b/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties
index 2335720fa2..1415251b8e 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties
@@ -133,3 +133,23 @@ _UI_Inclusion_Exact_literal = Exact
_UI_Inclusion_ExactAndUp_literal = ExactAndUp
_UI_Inclusion_ExactAndDown_literal = ExactAndDown
_UI_Inclusion_Regex_literal = Regex
+_UI_ResourceFilter_style_feature = Style
+_UI_ResourceFilter_folders_feature = Folders
+_UI_ResourceFilter_parentFolders_feature = Parent Folders
+_UI_ResourceFilter_rootResource_feature = Root Resource
+_UI_ResourceFilter_modelResources_feature = Model Resources
+_UI_ResourceFilter_modelObjects_feature = Model Objects
+_UI_ResourceFilter_textResources_feature = Text Resources
+_UI_ResourceFilter_binaryResources_feature = Binary Resources
+_UI_Style_EXACT_literal = EXACT
+_UI_Style_ANT_literal = ANT
+_UI_Style_REGEX_literal = REGEX
+_UI_ResourceFilter_patternStyle_feature = Pattern Style
+_UI_PatternStyle_NONE_literal = NONE
+_UI_PatternStyle_ANT_literal = ANT
+_UI_PatternStyle_REGEX_literal = REGEX
+_UI_ResourceFilter_childNodes_feature = Child Nodes
+_UI_ResourceFilter_includeParents_feature = Include Parents
+_UI_ResourceFilter_includeRoot_feature = Include Root
+_UI_PatternStyle_EXACT_literal = EXACT
+_UI_PatternStyle_TREE_literal = TREE
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ResourceFilterItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ResourceFilterItemProvider.java
index 575ca92929..361c112a93 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ResourceFilterItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ResourceFilterItemProvider.java
@@ -70,7 +70,14 @@ public class ResourceFilterItemProvider extends PermissionFilterItemProvider imp
super.getPropertyDescriptors(object);
addPathPropertyDescriptor(object);
- addInclusionPropertyDescriptor(object);
+ addPatternStylePropertyDescriptor(object);
+ addFoldersPropertyDescriptor(object);
+ addTextResourcesPropertyDescriptor(object);
+ addBinaryResourcesPropertyDescriptor(object);
+ addModelResourcesPropertyDescriptor(object);
+ addModelObjectsPropertyDescriptor(object);
+ addIncludeParentsPropertyDescriptor(object);
+ addIncludeRootPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
@@ -93,21 +100,154 @@ public class ResourceFilterItemProvider extends PermissionFilterItemProvider imp
}
/**
- * This adds a property descriptor for the Inclusion feature.
+ * This adds a property descriptor for the Pattern Style feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addInclusionPropertyDescriptor(Object object)
+ protected void addPatternStylePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ResourceFilter_patternStyle_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_ResourceFilter_patternStyle_feature", "_UI_ResourceFilter_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.RESOURCE_FILTER__PATTERN_STYLE, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Folders feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addFoldersPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ResourceFilter_folders_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_ResourceFilter_folders_feature", "_UI_ResourceFilter_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.RESOURCE_FILTER__FOLDERS, true, false, false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Model Resources feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addModelResourcesPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ResourceFilter_modelResources_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_ResourceFilter_modelResources_feature", "_UI_ResourceFilter_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.RESOURCE_FILTER__MODEL_RESOURCES, true, false, false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Model Objects feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addModelObjectsPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ResourceFilter_modelObjects_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_ResourceFilter_modelObjects_feature", "_UI_ResourceFilter_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.RESOURCE_FILTER__MODEL_OBJECTS, true, false, false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Include Parents feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addIncludeParentsPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ResourceFilter_includeParents_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_ResourceFilter_includeParents_feature", "_UI_ResourceFilter_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.RESOURCE_FILTER__INCLUDE_PARENTS, true, false, false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Include Root feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addIncludeRootPropertyDescriptor(Object object)
{
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_ResourceFilter_inclusion_feature"), //$NON-NLS-1$
+ getString("_UI_ResourceFilter_includeRoot_feature"), //$NON-NLS-1$
getString(
- "_UI_PropertyDescriptor_description", "_UI_ResourceFilter_inclusion_feature", "_UI_ResourceFilter_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- SecurityPackage.Literals.RESOURCE_FILTER__INCLUSION, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ "_UI_PropertyDescriptor_description", "_UI_ResourceFilter_includeRoot_feature", "_UI_ResourceFilter_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.RESOURCE_FILTER__INCLUDE_ROOT, true, false, false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Text Resources feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTextResourcesPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ResourceFilter_textResources_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_ResourceFilter_textResources_feature", "_UI_ResourceFilter_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.RESOURCE_FILTER__TEXT_RESOURCES, true, false, false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Binary Resources feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addBinaryResourcesPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ResourceFilter_binaryResources_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_ResourceFilter_binaryResources_feature", "_UI_ResourceFilter_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.RESOURCE_FILTER__BINARY_RESOURCES, true, false, false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
}
/**
@@ -160,7 +300,14 @@ public class ResourceFilterItemProvider extends PermissionFilterItemProvider imp
switch (notification.getFeatureID(ResourceFilter.class))
{
case SecurityPackage.RESOURCE_FILTER__PATH:
- case SecurityPackage.RESOURCE_FILTER__INCLUSION:
+ case SecurityPackage.RESOURCE_FILTER__PATTERN_STYLE:
+ case SecurityPackage.RESOURCE_FILTER__FOLDERS:
+ case SecurityPackage.RESOURCE_FILTER__TEXT_RESOURCES:
+ case SecurityPackage.RESOURCE_FILTER__BINARY_RESOURCES:
+ case SecurityPackage.RESOURCE_FILTER__MODEL_RESOURCES:
+ case SecurityPackage.RESOURCE_FILTER__MODEL_OBJECTS:
+ case SecurityPackage.RESOURCE_FILTER__INCLUDE_PARENTS:
+ case SecurityPackage.RESOURCE_FILTER__INCLUDE_ROOT:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}

Back to the top