Project

General

Profile

« Previous | Next » 

Revision 6779

remove xml_acccess.docid reference (oops)
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5560

View differences:

src/edu/ucsb/nceas/metacat/accesscontrol/AccessControlForSingleFile.java
231 231
			serialNumber=conn.getCheckOutSerialNumber();
232 232
			pstmt = conn.prepareStatement(
233 233
				"SELECT * FROM xml_access " + 
234
				"WHERE docid = ? " +
234
				"WHERE guid = ? " +
235 235
				"AND principal_name = ? " +
236 236
				"AND permission = ? " +
237 237
				"AND perm_type = ? " +
......
435 435
			// check out DBConnection
436 436
			conn = DBConnectionPool.getDBConnection("AccessControlList.isOwned");
437 437
			serialNumber = conn.getCheckOutSerialNumber();
438
			pstmt = conn.prepareStatement("SELECT 'x' FROM xml_documents "
439
					+ "WHERE docid = ? " + "AND user_owner = ?");
438
			String query = 
439
				"SELECT id.guid FROM xml_documents xd, identifier id "
440
				+ "WHERE xd.docid = id.docid " +
441
						"AND xd.rev = id.rev " +
442
						"AND id.guid = ? " + 
443
						"AND user_owner = ? ";
444
			pstmt = conn.prepareStatement(query );
440 445
			pstmt.setString(1, _guid);
441 446
			pstmt.setString(2, user);
442 447
			pstmt.execute();

Also available in: Unified diff