Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assist #9610: adjust rules for moving link children #3327

Merged
merged 3 commits into from
Jan 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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----")) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not expect to see another user's annotations once we have moved the image into a private group.

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