CouchCocoa
An Objective-C API for CouchDB
<CouchbaseValidationContext> Protocol Reference

Context passed into a CouchValidateUpdateBlock. More...

#import <CouchbaseCallbacks.h>

List of all members.

Properties

NSDictionary * currentRevision
 The contents of the current revision of the document, or nil if this is a new document.
NSString * databaseName
 The name of the database being updated.
NSString * userName
 The name of the logged-in user, or nil if this is an anonymous request.
BOOL isAdmin
 Does the user have admin privileges? (If the database is in the default "admin party" mode, this will be YES even when the userName is nil.)
NSDictionary * security
 The database's security object, which assigns roles and privileges.
NSString * errorType
 The type of error to report, if the validate block returns NO.
NSString * errorMessage
 The error message to return in the HTTP response, if the validate block returns NO.

Detailed Description

Context passed into a CouchValidateUpdateBlock.


Property Documentation

- (NSDictionary*) currentRevision [read, assign]

The contents of the current revision of the document, or nil if this is a new document.

- (NSString*) databaseName [read, assign]

The name of the database being updated.

- (NSString*) userName [read, assign]

The name of the logged-in user, or nil if this is an anonymous request.

- (NSDictionary*) security [read, assign]

The database's security object, which assigns roles and privileges.

- (NSString*) errorType [read, write, copy]

The type of error to report, if the validate block returns NO.

The default value is "forbidden", which will result in an HTTP 403 status.

- (NSString*) errorMessage [read, write, copy]

The error message to return in the HTTP response, if the validate block returns NO.

The default value is "invalid document".


The documentation for this protocol was generated from the following file:
 All Classes Functions Properties