Project

General

Profile

« Previous | Next » 

Revision 3248

Added by Jing Tao about 17 years ago

Remove the access query for return field since we remove the partial tree access control in eml.

View differences:

QuerySpecification.java
887 887
     * This sql command will selecet startnodeid and endnodeid that user can
888 888
     * NOT access
889 889
     */
890
    public String printAccessControlSQLForReturnField(String doclist)
890
    /*public String printAccessControlSQLForReturnField(String doclist)
891 891
    {
892 892
        StringBuffer sql = new StringBuffer();
893 893
        String allowString = constructAllowString();
......
922 922
        logMetacat.info("accessControlSQLForReturnField: "
923 923
                + sql.toString());
924 924
        return sql.toString();
925
    }
925
    }*/
926 926

  
927 927
    /**
928 928
     * This method prints sql based upon the <returnfield> tag in the
......
937 937
     * @param useXMLIndex a boolean flag indicating whether to search using
938 938
     *            xml_index
939 939
     */
940
    public String printExtendedSQL(String doclist,
941
            Hashtable unaccessableNodePair, boolean useXMLIndex)
940
    public String printExtendedSQL(String doclist, boolean useXMLIndex)
942 941
    {
943 942
        if (useXMLIndex && !containsPredicates)
944 943
        {
945
            return printExtendedSQL(doclist, unaccessableNodePair);
944
            return printExtendedSQL(doclist);
946 945
        }
947 946
        else
948 947
        {
......
974 973
                self.append(") AND xml_nodes.nodetype = 'TEXT'");
975 974
                self.append(" AND xml_nodes.rootnodeid = xml_documents.rootnodeid");
976 975

  
977
                addAccessRestrictionSQL(unaccessableNodePair, self);
976
                //addAccessRestrictionSQL(unaccessableNodePair, self);
978 977
            }
979 978

  
980 979
            return self.toString();
......
991 990
     * @param unaccessableNodePair the node pairs (start id and end id)
992 991
     *            which this user should not access
993 992
     */
994
    public String printExtendedSQL(String doclist,
995
            Hashtable unaccessableNodePair)
993
    public String printExtendedSQL(String doclist)
996 994
    {
997 995
        logMetacat.info("querySpecification.printExtendedSQL called\n");
998 996
        StringBuffer self = new StringBuffer();
......
1061 1059

  
1062 1060
        }
1063 1061

  
1064
        addAccessRestrictionSQL(unaccessableNodePair, self);
1062
        //addAccessRestrictionSQL(unaccessableNodePair, self);
1065 1063

  
1066 1064
        return self.toString();
1067 1065
    }
......
1125 1123
     * @param unaccessableNodePair hash of start/end nodeid pairs to restrict
1126 1124
     * @param self a stringbuffer to which the genrated SQL is appended
1127 1125
     */
1128
    private void addAccessRestrictionSQL(Hashtable unaccessableNodePair,
1126
    /*private void addAccessRestrictionSQL(Hashtable unaccessableNodePair,
1129 1127
            StringBuffer self)
1130 1128
    {
1131 1129
        // add control part for extended query
......
1146 1144
            self.append(endNodeId);
1147 1145
            self.append(")");
1148 1146
        }
1149
    }
1147
    }*/
1150 1148

  
1151 1149
    /**
1152 1150
     * This method prints sql that finds the values of attributes in the xml

Also available in: Unified diff