You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by cl...@apache.org on 2015/01/20 08:20:44 UTC

jena git commit: Added StaticSecurityEvaluator for testing as part of JENA-854

Repository: jena
Updated Branches:
  refs/heads/master 0361959fa -> 7e8d5f00c


Added StaticSecurityEvaluator for testing as part of JENA-854


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/7e8d5f00
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/7e8d5f00
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/7e8d5f00

Branch: refs/heads/master
Commit: 7e8d5f00cff4dda67164ba523e02de0abbfa5c52
Parents: 0361959
Author: Claude Warren <cl...@apache.org>
Authored: Tue Jan 20 07:19:17 2015 +0000
Committer: Claude Warren <cl...@apache.org>
Committed: Tue Jan 20 07:19:17 2015 +0000

----------------------------------------------------------------------
 .../security/ModelBasedSecurityEvaluator.java   | 59 ++++++++++++++++++++
 1 file changed, 59 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/7e8d5f00/jena-security/src/test/java/org/apache/jena/security/ModelBasedSecurityEvaluator.java
----------------------------------------------------------------------
diff --git a/jena-security/src/test/java/org/apache/jena/security/ModelBasedSecurityEvaluator.java b/jena-security/src/test/java/org/apache/jena/security/ModelBasedSecurityEvaluator.java
new file mode 100644
index 0000000..7f17aa1
--- /dev/null
+++ b/jena-security/src/test/java/org/apache/jena/security/ModelBasedSecurityEvaluator.java
@@ -0,0 +1,59 @@
+package org.apache.jena.security;
+
+import java.util.Set;
+
+import com.hp.hpl.jena.rdf.model.Model;
+
+public class ModelBasedSecurityEvaluator implements SecurityEvaluator {
+
+	private Model model;
+	
+	public ModelBasedSecurityEvaluator( Model model) {
+		this.model = model;
+	}
+	
+	
+
+	@Override
+	public boolean evaluate(Action action, SecNode graphIRI) {
+		return true;
+	}
+
+	@Override
+	public boolean evaluate(Action action, SecNode graphIRI, SecTriple triple) {
+		return true;
+	}
+
+	@Override
+	public boolean evaluate(Set<Action> actions, SecNode graphIRI) {
+		return true;
+	}
+
+	@Override
+	public boolean evaluate(Set<Action> actions, SecNode graphIRI,
+			SecTriple triple) {
+		return true;
+	}
+
+	@Override
+	public boolean evaluateAny(Set<Action> actions, SecNode graphIRI) {
+		return true;
+	}
+
+	@Override
+	public boolean evaluateAny(Set<Action> actions, SecNode graphIRI,
+			SecTriple triple) {
+		return true;
+	}
+
+	@Override
+	public boolean evaluateUpdate(SecNode graphIRI, SecTriple from, SecTriple to) {
+		return true;
+	}
+
+	@Override
+	public Object getPrincipal() {
+		return null;
+	}
+
+}


Re: jena git commit: Added StaticSecurityEvaluator for testing as part of JENA-854

Posted by Andy Seaborne <an...@apache.org>.
Claude,

On 20/01/15 07:20, claude@apache.org wrote:
> Repository: jena
> Updated Branches:
>    refs/heads/master 0361959fa -> 7e8d5f00c
>
>
> Added StaticSecurityEvaluator for testing as part of JENA-854

This only adds ModelBasedSecurityEvaluator, not StaticSecurityEvaluator, 
so the code does not compile.

Removing that one test that references StaticSecurityEvaluator, then 
causes other problems running SecuredAssemblerTest because it fails in 
testCreationWithArgs().

	Andy