]> SALOME platform Git repositories - tools/siman.git/commitdiff
Salome HOME
Fix of study visibility for readers.
authorrkv <rkv@opencascade.com>
Mon, 8 Apr 2013 13:01:12 +0000 (13:01 +0000)
committerrkv <rkv@opencascade.com>
Mon, 8 Apr 2013 13:01:12 +0000 (13:01 +0000)
Workspace/Siman-Common/src/org/splat/service/SearchServiceImpl.java

index 2d2a2dbf091ccec2cbfa9890cdb1964ac986700e..9c9182d97bfbcc24944e33c7fc2b3e0df7a7be4e 100644 (file)
@@ -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(