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