Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/ClassCheckImpl.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/PackageCheckImpl.java9
2 files changed, 18 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/ClassCheckImpl.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/ClassCheckImpl.java
index 202357989c..3c60ee1fe5 100644
--- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/ClassCheckImpl.java
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/ClassCheckImpl.java
@@ -60,6 +60,15 @@ public class ClassCheckImpl extends CheckImpl implements ClassCheck
public boolean isApplicable(CDORevision revision, CDORevisionProvider revisionProvider, CDOBranchPoint securityContext)
{
+ EClass actualClass = revision.getEClass();
+ for (EClass applicableClass : getClasses())
+ {
+ if (actualClass == applicableClass)
+ {
+ return true;
+ }
+ }
+
return false;
}
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/PackageCheckImpl.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/PackageCheckImpl.java
index c9e92a09f6..cf6e898697 100644
--- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/PackageCheckImpl.java
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/PackageCheckImpl.java
@@ -61,6 +61,15 @@ public class PackageCheckImpl extends CheckImpl implements PackageCheck
public boolean isApplicable(CDORevision revision, CDORevisionProvider revisionProvider, CDOBranchPoint securityContext)
{
+ EPackage actualPackage = revision.getEClass().getEPackage();
+ for (EPackage applicablePackage : getPackages())
+ {
+ if (actualPackage == applicablePackage)
+ {
+ return true;
+ }
+ }
+
return false;
}

Back to the top