Project

General

Profile

« Previous | Next » 

Revision 6744

refactor Metacat access handling to be on a per-revision basis so that it more closely aligns with the DataONE approach
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5560

View differences:

SpatialDocument.java
143 143
		if (isSpatialDocument) {
144 144

  
145 145
			/*
146
			 * Get the bounding coordinates
146
			 * Get the bounding coordinates for current public revision
147 147
			 */
148 148
			query = "SELECT path, nodedatanumerical, parentnodeid FROM xml_path_index"
149 149
					+ " WHERE docid = ?"
150
					+ " AND docid IN (SELECT distinct docid FROM xml_access WHERE docid = ?"
151
					+ " AND principal_name = 'public' AND perm_type = 'allow')"
150
					+ " AND docid IN " +
151
							"(SELECT distinct id.docid " +
152
							"FROM identifier id, xml_access xa, xml_documents xd "
153
							+ " WHERE id.docid = ?"
154
							+ " AND id.docid = xd.docid "
155
							+ " AND id.rev = xd.rev "
156
							+ " AND id.guid = xa.guid "
157
							+ " AND xa.principal_name = 'public' AND xa.perm_type = 'allow')"
152 158
					+ " AND (path = '" + westPath + "'" + "  OR path = '" + southPath
153 159
					+ "'" + "  OR path = '" + eastPath + "'" + "  OR path = '"
154 160
					+ northPath + "'" + " ) ORDER BY parentnodeid;";

Also available in: Unified diff