Project

General

Profile

1 2230 jones
SELECT docid,docname,doctype,date_created, date_updated, rev FROM xml_documents WHERE docid IN
2
       (
3
       (SELECT DISTINCT docid FROM xml_nodes WHERE  UPPER(nodedata) LIKE '%')
4
       )
5
   AND (docid IN
6
       (SELECT docid FROM xml_documents WHERE lower(user_owner) ='public')
7
       OR (docid IN
8
(
9
SELECT docid from xml_access
10
 WHERE(
11
      (lower(principal_name) = 'public' AND perm_type = 'allow'
12
       AND (permission='4' OR permission='7')
13
      ) OR
14
      (lower(principal_name) = 'public' AND perm_type = 'allow'
15
       AND (permission='4' OR permission='7')
16
      )
17
      )
18
      AND subtreeid IS NULL
19
)
20
AND docid NOT IN (SELECT docid from xml_access WHERE( (lower(principal_name) = 'public' AND perm_type = 'deny' AND perm_order ='allowFirst' AND (permission ='4' OR permission='7'))OR (lower(principal_name) = 'public' AND perm_type = 'deny' AND perm_order ='allowFirst' AND (permission='4' OR permission='7'))) AND subtreeid IS NULL )))
21
/