Learn R Programming

RGoogleDocs (version 0.7-0)

setAccess: Query and modify the Access Control List

Description

These functions allow one to programmatically query and modify the access control list for a a Google document. These allows us to find out or specify who owns, can write, or read the document. We can also revoke permission.

Usage

setAccess(doc, ..., .perms = list(...), con = doc@connection) getAccess(doc, con = doc@connection) removeAccess(doc, who, con = doc@connection)

Arguments

doc
the GoogleDocumentDescription object or the name of a document. If this is just the name, con must be specified.
...
name = value pairs where name gives the type of access being granted and value is the identity of the person to whom it is being granted. value is typically an email address or 'everyone'.
.perms
this provides an alternative way to specify the type-who pairs rather than ... whch is more convenient for calling this function programmatically rather than interactively.
con
the authenticated Google connection. See getGoogleDocsConnection.
who
the identity of the user for who the permission is to be removed. This is an email address or 'everyone'.

Value

getAccess returns a character vector giving the type-who pairs.setAccess returns the updated access list.removeAccess returns the result of the HTTP request to remove the permissions. See parseHTTPHeader.

References

http://code.google.com/apis/documents/docs/2.0/developers\_guide\_protocol.html#AccessControlLists

See Also

getDocs getGoogleDocsConnection