NIHVIVO-3404 Rename statement-related RequestedAction classes to consistent naming scheme.

This commit is contained in:
j2blake 2012-03-30 21:14:42 +00:00
parent 4dbcd6e6f7
commit 8b94fa3495
2 changed files with 41 additions and 41 deletions

View file

@ -21,8 +21,8 @@ import edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.PolicyDecision;
import edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.PolicyIface; import edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.PolicyIface;
import edu.cornell.mannlib.vitro.webapp.auth.policy.specialrelationships.AbstractRelationshipPolicy; import edu.cornell.mannlib.vitro.webapp.auth.policy.specialrelationships.AbstractRelationshipPolicy;
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction; import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AbstractDataPropertyAction; import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AbstractDataPropertyStatementAction;
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AbstractObjectPropertyAction; import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AbstractObjectPropertyStatementAction;
/** /**
* Permit self-editors to edit the properties of classes with which they share a * Permit self-editors to edit the properties of classes with which they share a
@ -100,12 +100,12 @@ public class SelfEditorRelationshipPolicy extends AbstractRelationshipPolicy
if (whatToAuth == null) { if (whatToAuth == null) {
decision = inconclusiveDecision("whatToAuth was null"); decision = inconclusiveDecision("whatToAuth was null");
} else if (whatToAuth instanceof AbstractDataPropertyAction) { } else if (whatToAuth instanceof AbstractDataPropertyStatementAction) {
decision = isAuthorized(whoToAuth, decision = isAuthorized(whoToAuth,
distill((AbstractDataPropertyAction) whatToAuth)); distill((AbstractDataPropertyStatementAction) whatToAuth));
} else if (whatToAuth instanceof AbstractObjectPropertyAction) { } else if (whatToAuth instanceof AbstractObjectPropertyStatementAction) {
decision = isAuthorized(whoToAuth, decision = isAuthorized(whoToAuth,
distill((AbstractObjectPropertyAction) whatToAuth)); distill((AbstractObjectPropertyStatementAction) whatToAuth));
} else { } else {
decision = inconclusiveDecision("Does not authorize " decision = inconclusiveDecision("Does not authorize "
+ whatToAuth.getClass().getSimpleName() + " actions"); + whatToAuth.getClass().getSimpleName() + " actions");
@ -118,12 +118,12 @@ public class SelfEditorRelationshipPolicy extends AbstractRelationshipPolicy
} }
} }
private DistilledAction distill(AbstractDataPropertyAction action) { private DistilledAction distill(AbstractDataPropertyStatementAction action) {
return new DistilledAction(action.getPredicateUri(), return new DistilledAction(action.getPredicateUri(),
action.getSubjectUri()); action.getSubjectUri());
} }
private DistilledAction distill(AbstractObjectPropertyAction action) { private DistilledAction distill(AbstractObjectPropertyStatementAction action) {
return new DistilledAction(action.uriOfPredicate, action.uriOfSubject, return new DistilledAction(action.uriOfPredicate, action.uriOfSubject,
action.uriOfObject); action.uriOfObject);
} }

View file

@ -35,8 +35,8 @@ import edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.Authorization;
import edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.PolicyDecision; import edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.PolicyDecision;
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin.ServerStatus; import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin.ServerStatus;
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction; import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AddDataPropStmt; import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AddDataPropertyStatement;
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AddObjectPropStmt; import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AddObjectPropertyStatement;
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.resource.AddResource; import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.resource.AddResource;
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
@ -180,35 +180,35 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass {
@Test @Test
public void dataPropSubjectIsRestricted() { public void dataPropSubjectIsRestricted() {
action = new AddDataPropStmt(URI_RESTRICTED_RESOURCE, action = new AddDataPropertyStatement(URI_RESTRICTED_RESOURCE,
URI_PERMITTED_PREDICATE, "junk", null, null); URI_PERMITTED_PREDICATE, "junk", null, null);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }
@Test @Test
public void dataPropPredicateIsRestricted() { public void dataPropPredicateIsRestricted() {
action = new AddDataPropStmt(URI_JOE_EDITED_IT, action = new AddDataPropertyStatement(URI_JOE_EDITED_IT,
URI_RESTRICTED_PREDICATE, "junk", null, null); URI_RESTRICTED_PREDICATE, "junk", null, null);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }
@Test @Test
public void objectPropSubjectIsRestricted() { public void objectPropSubjectIsRestricted() {
action = new AddObjectPropStmt(URI_RESTRICTED_RESOURCE, action = new AddObjectPropertyStatement(URI_RESTRICTED_RESOURCE,
URI_PERMITTED_PREDICATE, URI_JOE_EDITED_IT); URI_PERMITTED_PREDICATE, URI_JOE_EDITED_IT);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }
@Test @Test
public void objectPropPredicateIsRestricted() { public void objectPropPredicateIsRestricted() {
action = new AddObjectPropStmt(URI_PERMITTED_RESOURCE, action = new AddObjectPropertyStatement(URI_PERMITTED_RESOURCE,
URI_RESTRICTED_PREDICATE, URI_JOE_EDITED_IT); URI_RESTRICTED_PREDICATE, URI_JOE_EDITED_IT);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }
@Test @Test
public void objectPropObjectIsRestricted() { public void objectPropObjectIsRestricted() {
action = new AddObjectPropStmt(URI_JOE_EDITED_IT, action = new AddObjectPropertyStatement(URI_JOE_EDITED_IT,
URI_PERMITTED_PREDICATE, URI_RESTRICTED_RESOURCE); URI_PERMITTED_PREDICATE, URI_RESTRICTED_RESOURCE);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }
@ -219,14 +219,14 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass {
@Test @Test
public void dataPropSubjectIsInfoResourceButNobodyIsSelfEditing() { public void dataPropSubjectIsInfoResourceButNobodyIsSelfEditing() {
action = new AddDataPropStmt(URI_JOE_WROTE_IT, URI_PERMITTED_PREDICATE, action = new AddDataPropertyStatement(URI_JOE_WROTE_IT, URI_PERMITTED_PREDICATE,
"junk", null, null); "junk", null, null);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idNobody, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idNobody, action));
} }
@Test @Test
public void dataPropSubjectIsInfoResourceButNoAuthorsOrEditorsOrFeatured() { public void dataPropSubjectIsInfoResourceButNoAuthorsOrEditorsOrFeatured() {
action = new AddDataPropStmt(URI_NOBODY_WROTE_IT, action = new AddDataPropertyStatement(URI_NOBODY_WROTE_IT,
URI_PERMITTED_PREDICATE, "junk", null, null); URI_PERMITTED_PREDICATE, "junk", null, null);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
assertDecision(INCONCLUSIVE, policy.isAuthorized(idBozoAndJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idBozoAndJoe, action));
@ -234,28 +234,28 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass {
@Test @Test
public void dataPropSubjectIsInfoResourceButWrongAuthor() { public void dataPropSubjectIsInfoResourceButWrongAuthor() {
action = new AddDataPropStmt(URI_BOZO_WROTE_IT, action = new AddDataPropertyStatement(URI_BOZO_WROTE_IT,
URI_PERMITTED_PREDICATE, "junk", null, null); URI_PERMITTED_PREDICATE, "junk", null, null);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }
@Test @Test
public void dataPropSubjectIsInfoResourceButWrongEditor() { public void dataPropSubjectIsInfoResourceButWrongEditor() {
action = new AddDataPropStmt(URI_BOZO_EDITED_IT, action = new AddDataPropertyStatement(URI_BOZO_EDITED_IT,
URI_PERMITTED_PREDICATE, "junk", null, null); URI_PERMITTED_PREDICATE, "junk", null, null);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }
@Test @Test
public void dataPropSubjectIsInfoResourceButWrongFeatured() { public void dataPropSubjectIsInfoResourceButWrongFeatured() {
action = new AddDataPropStmt(URI_BOZO_FEATURED_IN_IT, action = new AddDataPropertyStatement(URI_BOZO_FEATURED_IN_IT,
URI_PERMITTED_PREDICATE, "junk", null, null); URI_PERMITTED_PREDICATE, "junk", null, null);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }
@Test @Test
public void dataPropSubjectIsInfoResourceWithSelfEditingAuthor() { public void dataPropSubjectIsInfoResourceWithSelfEditingAuthor() {
action = new AddDataPropStmt(URI_JOE_WROTE_IT, URI_PERMITTED_PREDICATE, action = new AddDataPropertyStatement(URI_JOE_WROTE_IT, URI_PERMITTED_PREDICATE,
"junk", null, null); "junk", null, null);
assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action));
assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action));
@ -263,7 +263,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass {
@Test @Test
public void dataPropSubjectIsInfoResourceWithSelfEditingEditor() { public void dataPropSubjectIsInfoResourceWithSelfEditingEditor() {
action = new AddDataPropStmt(URI_JOE_EDITED_IT, action = new AddDataPropertyStatement(URI_JOE_EDITED_IT,
URI_PERMITTED_PREDICATE, "junk", null, null); URI_PERMITTED_PREDICATE, "junk", null, null);
assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action));
assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action));
@ -271,7 +271,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass {
@Test @Test
public void dataPropSubjectIsInfoResourceWithSelfEditingFeatured() { public void dataPropSubjectIsInfoResourceWithSelfEditingFeatured() {
action = new AddDataPropStmt(URI_JOE_FEATURED_IN_IT, action = new AddDataPropertyStatement(URI_JOE_FEATURED_IN_IT,
URI_PERMITTED_PREDICATE, "junk", null, null); URI_PERMITTED_PREDICATE, "junk", null, null);
assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action));
assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action));
@ -279,14 +279,14 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass {
@Test @Test
public void objectPropSubjectIsInfoResourceButNobodyIsSelfEditing() { public void objectPropSubjectIsInfoResourceButNobodyIsSelfEditing() {
action = new AddObjectPropStmt(URI_JOE_EDITED_IT, action = new AddObjectPropertyStatement(URI_JOE_EDITED_IT,
URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idNobody, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idNobody, action));
} }
@Test @Test
public void objectPropSubjectIsInfoResourceButNoAuthorsOrEditorsOrFeatured() { public void objectPropSubjectIsInfoResourceButNoAuthorsOrEditorsOrFeatured() {
action = new AddObjectPropStmt(URI_NOBODY_WROTE_IT, action = new AddObjectPropertyStatement(URI_NOBODY_WROTE_IT,
URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
assertDecision(INCONCLUSIVE, policy.isAuthorized(idBozoAndJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idBozoAndJoe, action));
@ -294,28 +294,28 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass {
@Test @Test
public void objectPropSubjectIsInfoResourceButWrongAuthor() { public void objectPropSubjectIsInfoResourceButWrongAuthor() {
action = new AddObjectPropStmt(URI_BOZO_WROTE_IT, action = new AddObjectPropertyStatement(URI_BOZO_WROTE_IT,
URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }
@Test @Test
public void objectPropSubjectIsInfoResourceButWrongEditor() { public void objectPropSubjectIsInfoResourceButWrongEditor() {
action = new AddObjectPropStmt(URI_BOZO_EDITED_IT, action = new AddObjectPropertyStatement(URI_BOZO_EDITED_IT,
URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }
@Test @Test
public void objectPropSubjectIsInfoResourceButWrongFeatured() { public void objectPropSubjectIsInfoResourceButWrongFeatured() {
action = new AddObjectPropStmt(URI_BOZO_FEATURED_IN_IT, action = new AddObjectPropertyStatement(URI_BOZO_FEATURED_IN_IT,
URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }
@Test @Test
public void objectPropSubjectIsInfoResourceWithSelfEditingAuthor() { public void objectPropSubjectIsInfoResourceWithSelfEditingAuthor() {
action = new AddObjectPropStmt(URI_JOE_WROTE_IT, action = new AddObjectPropertyStatement(URI_JOE_WROTE_IT,
URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE);
assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action));
assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action));
@ -323,7 +323,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass {
@Test @Test
public void objectPropSubjectIsInfoResourceWithSelfEditingEditor() { public void objectPropSubjectIsInfoResourceWithSelfEditingEditor() {
action = new AddObjectPropStmt(URI_JOE_EDITED_IT, action = new AddObjectPropertyStatement(URI_JOE_EDITED_IT,
URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE);
assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action));
assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action));
@ -331,7 +331,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass {
@Test @Test
public void objectPropSubjectIsInfoResourceWithSelfEditingFeatured() { public void objectPropSubjectIsInfoResourceWithSelfEditingFeatured() {
action = new AddObjectPropStmt(URI_JOE_FEATURED_IN_IT, action = new AddObjectPropertyStatement(URI_JOE_FEATURED_IN_IT,
URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE);
assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action));
assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action));
@ -339,14 +339,14 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass {
@Test @Test
public void objectPropObjectIsInfoResourcebutNobodyIsSelfEditing() { public void objectPropObjectIsInfoResourcebutNobodyIsSelfEditing() {
action = new AddObjectPropStmt(URI_PERMITTED_RESOURCE, action = new AddObjectPropertyStatement(URI_PERMITTED_RESOURCE,
URI_PERMITTED_PREDICATE, URI_JOE_EDITED_IT); URI_PERMITTED_PREDICATE, URI_JOE_EDITED_IT);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idNobody, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idNobody, action));
} }
@Test @Test
public void objectPropObjectIsInfoResourceButNoAuthorsOrEditors() { public void objectPropObjectIsInfoResourceButNoAuthorsOrEditors() {
action = new AddObjectPropStmt(URI_PERMITTED_RESOURCE, action = new AddObjectPropertyStatement(URI_PERMITTED_RESOURCE,
URI_PERMITTED_PREDICATE, URI_NOBODY_WROTE_IT); URI_PERMITTED_PREDICATE, URI_NOBODY_WROTE_IT);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
assertDecision(INCONCLUSIVE, policy.isAuthorized(idBozoAndJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idBozoAndJoe, action));
@ -354,28 +354,28 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass {
@Test @Test
public void objectPropObjectIsInfoResourceButWrongAuthor() { public void objectPropObjectIsInfoResourceButWrongAuthor() {
action = new AddObjectPropStmt(URI_PERMITTED_RESOURCE, action = new AddObjectPropertyStatement(URI_PERMITTED_RESOURCE,
URI_PERMITTED_PREDICATE, URI_BOZO_WROTE_IT); URI_PERMITTED_PREDICATE, URI_BOZO_WROTE_IT);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }
@Test @Test
public void objectPropObjectIsInfoResourceButWrongEditor() { public void objectPropObjectIsInfoResourceButWrongEditor() {
action = new AddObjectPropStmt(URI_PERMITTED_RESOURCE, action = new AddObjectPropertyStatement(URI_PERMITTED_RESOURCE,
URI_PERMITTED_PREDICATE, URI_BOZO_EDITED_IT); URI_PERMITTED_PREDICATE, URI_BOZO_EDITED_IT);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }
@Test @Test
public void objectPropObjectIsInfoResourceButWrongFeatured() { public void objectPropObjectIsInfoResourceButWrongFeatured() {
action = new AddObjectPropStmt(URI_PERMITTED_RESOURCE, action = new AddObjectPropertyStatement(URI_PERMITTED_RESOURCE,
URI_PERMITTED_PREDICATE, URI_BOZO_FEATURED_IN_IT); URI_PERMITTED_PREDICATE, URI_BOZO_FEATURED_IN_IT);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }
@Test @Test
public void objectPropObjectIsInfoResourceWithSelfEditingAuthor() { public void objectPropObjectIsInfoResourceWithSelfEditingAuthor() {
action = new AddObjectPropStmt(URI_PERMITTED_RESOURCE, action = new AddObjectPropertyStatement(URI_PERMITTED_RESOURCE,
URI_PERMITTED_PREDICATE, URI_JOE_WROTE_IT); URI_PERMITTED_PREDICATE, URI_JOE_WROTE_IT);
assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action));
assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action));
@ -383,7 +383,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass {
@Test @Test
public void objectPropObjectIsInfoResourceWithSelfEditingEditor() { public void objectPropObjectIsInfoResourceWithSelfEditingEditor() {
action = new AddObjectPropStmt(URI_PERMITTED_RESOURCE, action = new AddObjectPropertyStatement(URI_PERMITTED_RESOURCE,
URI_PERMITTED_PREDICATE, URI_JOE_EDITED_IT); URI_PERMITTED_PREDICATE, URI_JOE_EDITED_IT);
assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action));
assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action));
@ -391,7 +391,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass {
@Test @Test
public void objectPropObjectIsInfoResourceWithSelfEditingFeatured() { public void objectPropObjectIsInfoResourceWithSelfEditingFeatured() {
action = new AddObjectPropStmt(URI_PERMITTED_RESOURCE, action = new AddObjectPropertyStatement(URI_PERMITTED_RESOURCE,
URI_PERMITTED_PREDICATE, URI_JOE_FEATURED_IN_IT); URI_PERMITTED_PREDICATE, URI_JOE_FEATURED_IN_IT);
assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action));
assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action));
@ -403,14 +403,14 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass {
@Test @Test
public void dataPropSubjectIsNotInfoResource() { public void dataPropSubjectIsNotInfoResource() {
action = new AddDataPropStmt(URI_PERMITTED_RESOURCE, action = new AddDataPropertyStatement(URI_PERMITTED_RESOURCE,
URI_PERMITTED_PREDICATE, "junk", null, null); URI_PERMITTED_PREDICATE, "junk", null, null);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }
@Test @Test
public void objectPropNeitherSubjectOrObjectIsInfoResource() { public void objectPropNeitherSubjectOrObjectIsInfoResource() {
action = new AddObjectPropStmt(URI_PERMITTED_RESOURCE, action = new AddObjectPropertyStatement(URI_PERMITTED_RESOURCE,
URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE);
assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action));
} }