NIHVIVO-3404 Improve the hierarchy of statement-based RequestedActions. Add constructors that accept either individual URIs or PropertyStatements. Don't ask for or hold the value of a DataProperty, because it is never used by a policy or permission (at least so far).
This commit is contained in:
parent
e8fafcc10c
commit
b0c7241ede
13 changed files with 112 additions and 105 deletions
|
@ -118,21 +118,19 @@ public class SelfEditingPolicyTest extends AbstractTestClass {
|
|||
|
||||
// now with dataprop statements
|
||||
whatToAuth = new AddDataPropertyStatement(SELFEDITOR_URI,
|
||||
"http://mannlib.cornell.edu/bad#prp234", "someString", null,
|
||||
null);
|
||||
"http://mannlib.cornell.edu/bad#prp234");
|
||||
assertDecision(INCONCLUSIVE, policy.isAuthorized(ids, whatToAuth));
|
||||
|
||||
whatToAuth = new AddDataPropertyStatement(SELFEDITOR_URI,
|
||||
"http://mannlib.cornell.edu/bad#prp999", "someString", null,
|
||||
null);
|
||||
"http://mannlib.cornell.edu/bad#prp999");
|
||||
assertDecision(INCONCLUSIVE, policy.isAuthorized(ids, whatToAuth));
|
||||
|
||||
whatToAuth = new AddDataPropertyStatement(SELFEDITOR_URI,
|
||||
SAFE_PREDICATE, "someString", null, null);
|
||||
SAFE_PREDICATE);
|
||||
assertDecision(AUTHORIZED, policy.isAuthorized(ids, whatToAuth));
|
||||
|
||||
whatToAuth = new AddDataPropertyStatement(SELFEDITOR_URI,
|
||||
UNSAFE_PREDICATE, "someString", null, null);
|
||||
UNSAFE_PREDICATE);
|
||||
assertDecision(INCONCLUSIVE, policy.isAuthorized(ids, whatToAuth));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue