Project

General

Profile

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