RemoteStorage.Access

Keeps track of claimed access and scopes.

Summary
RemoteStorage.AccessKeeps track of claimed access and scopes.
Functions
claimClaim access on a given scope with given mode.
Properties
scopesHolds an array of claimed scopes in the form

Functions

claim

claim: function(scope,
mode)

Claim access on a given scope with given mode.

Parameters

scopeAn access scope, such as “contacts” or “calendar”
modeAccess mode.  Either “r” for read-only or “rw” for read/write

Example

remoteStorage.access.claim('contacts', 'r');
remoteStorage.access.claim('pictures', 'rw');

Root access

Claiming root access, meaning complete access to all files and folders of a storage, can be done using an asterisk:

remoteStorage.access.claim('*', 'rw');

Properties

scopes

Holds an array of claimed scopes in the form

{ name: "<scope-name>", mode: "<mode>" }
claim: function(scope,
mode)
Claim access on a given scope with given mode.
Close