Skip to content

Commit

Permalink
Merge pull request #3327 from mtbc/trac-9610-graphs
Browse files Browse the repository at this point in the history
assist #9610: adjust rules for moving link children
  • Loading branch information
joshmoore committed Jan 13, 2015
2 parents 43bbecc + 9cda6a4 commit fc6cc04
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@
p:changes="OF:[I]/n"/>
<bean parent="graphPolicyRule" p:matches="L:ILink[!DI].parent = [DI], L.child = C:!Job[E]/!d" p:changes="L:[D]/n"/>
<bean parent="graphPolicyRule" p:matches="L:ILink.parent = [I], L.child = C:[E]{o}/o" p:changes="C:[I]"/>
<bean parent="graphPolicyRule" p:matches="L:ILink.parent = [I], L.child = C:[E]{o}/d" p:changes="C:[I]/n"/>
<bean parent="graphPolicyRule" p:matches="!$to_private, L:ILink.parent = [I], L.child = C:[E]{o}/d" p:changes="C:[I]/n"/>
<bean parent="graphPolicyRule" p:matches="$to_private, L:ILink[E].parent = [I], L.child = [E]{o}/!o" p:changes="L:[D]/n"/>
<bean parent="graphPolicyRule" p:matches="L:ILink.parent = [I], L.child = C:Job[E]{o}" p:changes="C:[I]"/>
<bean parent="graphPolicyRule" p:matches="[I] == X:[E]{o}" p:changes="X:[I]"/>
<bean parent="graphPolicyRule" p:matches="[I] == X:[D]" p:changes="X:[I]"/>
Expand Down Expand Up @@ -177,6 +178,11 @@
<bean parent="graphPolicyRule" p:matches="L:ILink[E].parent = [I], L.child = [E]{a}" p:changes="L:[D]/n"/>
<bean parent="graphPolicyRule" p:matches="L:ILink[E].parent = [E], L.child = [I]" p:changes="L:[D]/n"/>
<bean parent="graphPolicyRule" p:matches="L:ILink[E]{a}.parent = [I]" p:changes="L:[D]/n"/>
<bean parent="graphPolicyRule" p:matches="ILink[D].child = C:BooleanAnnotation[E]{o}" p:changes="C:[D]/n"/>
<bean parent="graphPolicyRule" p:matches="ILink[D].child = C:CommentAnnotation[E]{o}" p:changes="C:[D]/n"/>
<bean parent="graphPolicyRule" p:matches="ILink[D].child = C:DoubleAnnotation[E]{o}" p:changes="C:[D]/n"/>
<bean parent="graphPolicyRule" p:matches="ILink[D].child = C:LongAnnotation[E]{o}" p:changes="C:[D]/n"/>
<bean parent="graphPolicyRule" p:matches="ILink[D].child = C:TimestampAnnotation[E]{o}" p:changes="C:[D]/n"/>
</util:list>

<util:list id="chownRules" value-type="ome.services.graphs.GraphPolicyRule">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ private void moveImageWithNonSharedAnnotation(String src, String dest,
assertEquals(iQuery.findAllByQuery(sb.toString(), param).size(),
annotationIdsUser1.size());
n = 0;
if (src.equals("rwrw--")) n = annotationIdsUser2.size();
if (src.equals("rwrw--") && !dest.equals("rw----")) {
n = annotationIdsUser2.size();
}
param = new ParametersI();
param.addIds(annotationIdsUser2);
assertEquals("#9496? anns", iQuery.findAllByQuery(sb.toString(), param)
Expand Down Expand Up @@ -316,7 +318,6 @@ public void testMoveImageAnnotatedByUsersInDestinationGroupRWRWtoRWRA()
* @throws Exception
* Thrown if an error occurred.
*/
@Test(groups = "broken")
public void testMoveImageAnnotatedByUsersInDestinationGroupRWRWtoRW()
throws Exception {
moveImageWithNonSharedAnnotation("rwrw--", "rw----", true);
Expand Down Expand Up @@ -416,7 +417,6 @@ public void testMoveImageAnnotatedByUsersOneNotInDestinationGroupDestinationGrou
* @throws Exception
* Thrown if an error occurred.
*/
@Test(groups = "broken")
public void testMoveImageAnnotatedByUsersOneNotInDestinationGroupDestinationGroupRWRWtoRW()
throws Exception {
moveImageWithNonSharedAnnotation("rwrw--", "rw----", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@ public void testMoveBasicImageByAdmin() throws Exception {
* @throws Exception
* Thrown if an error occurred.
*/
@Test(groups = "broken")
public void testMoveDatasetImageGraphLinkDoneByImageOwnerRWRWtoRW()
throws Exception {
String perms = "rw----"; // destination
Expand Down

0 comments on commit fc6cc04

Please sign in to comment.