Revision 1447
Added by Jing Tao almost 22 years ago
src/edu/ucsb/nceas/metacat/QuerySpecification.java | ||
---|---|---|
204 | 204 |
{ |
205 | 205 |
String allowQuery = null; |
206 | 206 |
String allowString = constructAllowString(); |
207 |
allowQuery ="SELECT docid from xml_access WHERE "+allowString; |
|
207 |
allowQuery ="SELECT docid from xml_access WHERE( "+allowString; |
|
208 |
allowQuery = allowQuery +") AND subtreeid IS NULL"; |
|
208 | 209 |
MetaCatUtil.debugMessage("allow query is: "+ allowQuery, 30); |
209 | 210 |
return allowQuery; |
210 | 211 |
|
... | ... | |
254 | 255 |
{ |
255 | 256 |
String denyQuery = null; |
256 | 257 |
String denyString = constructDenyString(); |
257 |
denyQuery ="SELECT docid from xml_access WHERE " + denyString; |
|
258 |
denyQuery ="SELECT docid from xml_access WHERE( " + denyString; |
|
259 |
denyQuery = denyQuery + ") AND subtreeid IS NULL "; |
|
258 | 260 |
MetaCatUtil.debugMessage("denyquery is: "+ denyQuery, 30); |
259 | 261 |
return denyQuery; |
260 | 262 |
|
Also available in: Unified diff
In search query, add subtreeid is null this condition to make sure is for top level documents.