LaceWiki中定义了一个restrictedEntityManager,它利用Hibernate的Filter去过滤掉用户无权访问的WikiNode。可在实现的时候,用户如果想只能自己访问某文档,则该filter会把用户自己也过滤掉,所以,需要向filter中传入多个参数,以保证owner访问时不受accessLevel的限制。注意,由于是or条件,所以要在conditions外面加上括号。
具体解决办法参见 https://jira.jboss.org/jira/browse/JBSEAM-3871
参考文档
http://www.next-presso.fr/2008/10/how-to-use-hibernate-filters-in-seam/lang/en
http://www.hibernate.org/hib_docs/v3/reference/en-US/html/filters.html
http://docs.jboss.org/seam/latest/reference/en-US/html/persistence.html#d0e7383