예제 #1
0
파일: ObjectWithACP.py 프로젝트: HISG/utaka
def setObject(user, bucket, key, metadata, data, contentMd5, contentType, contentDisposition, contentEncoding, accessControlPolicy):
	if not ObjectACP.checkUserPermission(user, bucket, key, 'write'):
		raise ForbiddenException.AccessDeniedException()
	res = Object.setObject(userid = user, bucket=bucket, key=key, metadata=metadata, data=data, content_md5 = contentMd5, content_type=contentType, content_disposition=contentDisposition, content_encoding=contentEncoding)
	ObjectACP.setObjectACP(bucket, key, accessControlPolicy)
	BucketLogging.logKeyEvent(user, bucket, key, 'set', res[2])
	return res