From: rkv Date: Mon, 8 Apr 2013 13:01:12 +0000 (+0000) Subject: Fix of study visibility for readers. X-Git-Tag: Root_Delivery2_2013_04_22~47 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d6181646e021ca5727d963b9fd94a62f4e070ea5;p=tools%2Fsiman.git Fix of study visibility for readers. --- diff --git a/Workspace/Siman-Common/src/org/splat/service/SearchServiceImpl.java b/Workspace/Siman-Common/src/org/splat/service/SearchServiceImpl.java index 2d2a2db..9c9182d 100644 --- a/Workspace/Siman-Common/src/org/splat/service/SearchServiceImpl.java +++ b/Workspace/Siman-Common/src/org/splat/service/SearchServiceImpl.java @@ -435,6 +435,14 @@ public class SearchServiceImpl implements SearchService { + "select rel.owner from contributor_rel rel " + "where {alias}.rid = rel.owner AND rel.refer = ?)", actorId, Hibernate.LONG)) + .add( + /* If the user is reader */ + Restrictions + .sqlRestriction( + "{alias}.rid in (" + + "select rel.owner from reader_rel rel " + + "where {alias}.rid = rel.owner AND rel.refer = ?)", + actorId, Hibernate.LONG)) .add( /* If the user is author */ Restrictions.eq("study.manager.rid", actorId)).add(