Project

General

Profile

« Previous | Next » 

Revision 1454

Added by Jing Tao over 21 years ago

Revise the query for access control return field.

View differences:

src/edu/ucsb/nceas/metacat/QuerySpecification.java
732 732
    sql.append(" WHERE xml_access.docid = xml_documents.docid");
733 733
    sql.append(" AND xml_documents.user_owner ='");
734 734
    sql.append(userName);
735
    sql.append("')"); 
735
    sql.append("' AND xml_access.startnodeid IS NOT NULL)"); 
736 736
    sql.append(")");
737 737
    sql.append(" AND ");
738 738
    sql.append("(");
739
    sql.append("(startnodeid NOT IN (SELECT startnodeid from xml_access where ");
739
    sql.append("(startnodeid NOT IN (SELECT startnodeid from xml_access where( ");
740 740
    sql.append(allowString);
741
    sql.append(") AND (startnodeid IS NOT NULL))");
741 742
    sql.append(")");
742
    sql.append(")");
743
    sql.append(" OR (startnodeid IN (SELECT startnodeid from xml_access where ");
743
    sql.append(" OR (startnodeid IN (SELECT startnodeid from xml_access where( ");
744 744
    sql.append(denyString);
745
    sql.append(") AND (startnodeid IS NOT NULL))");
745 746
    sql.append(")");
746 747
    sql.append(")");
747 748
    sql.append(")");
748
    sql.append(")");
749 749
    MetaCatUtil.debugMessage("accessControlSQLForReturnField: " +
750 750
                             sql.toString(), 30);
751 751
    return sql.toString();

Also available in: Unified diff