Modules.Cloud.ACLs
> Modules.Cloud.ACLs

Provides methods for accessing ArrowDB access control lists (ACLs).

Examples

Create an ACL

This example creates an ACL object and checks the response.

Cloud.ACLs.create({
    name: 'testACL',
    reader_ids: readers.ids.join(','),
    writer_ids: writers.ids.join(','),
    public_read: "false",
    public_write: "false"
}, function (e) {
    if (e.success) {
        alert('Created!');
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Update an ACL

This example updates an ACL object and checks the response.

Cloud.ACLs.update({
    name: 'testACL',
    reader_ids: '',
    writer_ids: '',
    public_read: "true",
    public_write: "true"
}, function (e) {
    if (e.success) {
        alert('Updated!');
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Show an ACL

This example requests an ACL object and checks the response.

Cloud.ACLs.show({
    name: 'testACL'
}, function (e) {
    if (e.success) {
        alert('Shown!');
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Remove an ACL

This example deletes an ACL object and checks the response.

Cloud.ACLs.remove({
    name: 'testACL'
}, function (e) {
    if (e.success) {
        alert('Removed!');
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Add user to an ACL

This example adds a user to an ACL object and checks the response.

Cloud.ACLs.addUser({
    name: 'testACL',
    reader_ids: readers.ids.join(','),
    writer_ids: writers.ids.join(',')
}, function (e) {
    if (e.success) {
        alert('Added!');
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Remove user from an ACL

This example removes a user from an ACL object and checks the response.

Cloud.ACLs.removeUser({
    name: 'testACL',
    reader_ids: readers.ids.join(','),
    writer_ids: writers.ids.join(',')
}, function (e) {
    if (e.success) {
        alert('Removed!');
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});

Check user permissions

This example checks a user's permissions in an ACL and checks the response.

Cloud.ACLs.checkUser({
    name: 'testACL',
    user_id: userID
}, function (e) {
    if (e.success) {
        alert('Read Permission: ' + e.permission['read permission'] +
              '\nWrite Permission: ' + e.permission['write permission']);
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});
  • 0.8
  • 0.8
  • 0.8
Defined By

Properties

apiName : Stringreadonly

The name of the API that this proxy corresponds to.

The name of the API that this proxy corresponds to.

The value of this property is the fully qualified name of the API. For example, Button returns Ti.UI.Button.

  • 3.2.0
  • 3.2.0
  • 3.2.0
Indicates if the proxy will bubble an event to its parent. ...

Indicates if the proxy will bubble an event to its parent.

Some proxies (most commonly views) have a relationship to other proxies, often established by the add() method. For example, for a button added to a window, a click event on the button would bubble up to the window. Other common parents are table sections to their rows, table views to their sections, and scrollable views to their views. Set this property to false to disable the bubbling to the proxy's parent.

Default: true

  • 3.0.0
  • 3.0.0
  • 3.0.0

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks will also be called on the proxy. Proxies that require the activity lifecycle will need this property set to the appropriate containing Window or TabGroup.

  • 3.6.0
Defined By

Methods

Modules.Cloud.ACLs
( parameters, callback )
Adds one or more users to an ACL object. ...

Adds one or more users to an ACL object.

Requires user login.

See Access Control List (ACL): Add user(s) to an ACL for the request parameters supported by this method.

Parameters

  • parameters : Dictionary

    Parameters to send in the request.

  • callback : Callback<CloudACLsResponse>

    Callback function to execute when the method completes.

Returns

  • void
Applies the properties to the proxy. ...

Applies the properties to the proxy.

Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that myproxy[key] = value.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Parameters

  • props : Dictionary

    A dictionary of properties to apply.

Returns

  • void
Modules.Cloud.ACLs
( parameters, callback )
Checks a user's permission in an ACL object. ...

Checks a user's permission in an ACL object.

Requires user login.

See Access Control List (ACL): Check a user's permission in an ACL for the request parameters supported by this method.

Parameters

Returns

  • void
Modules.Cloud.ACLs
( parameters, callback )
Creates an ACL object. ...

Creates an ACL object.

Requires user login.

See Access Control List (ACL): Create an access control list for the request parameters supported by this method.

Data is returned in the acls property of the parameter passed to the callback.

Parameters

  • parameters : Dictionary

    Parameters to send in the request.

  • callback : Callback<CloudACLsResponse>

    Callback function to execute when the method completes.

Returns

  • void
Gets the value of the apiName property. ...

Gets the value of the apiName property.

  • 3.2.0
  • 3.2.0
  • 3.2.0

Returns

  • String
Gets the value of the bubbleParent property. ...

Gets the value of the bubbleParent property.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Returns

  • Boolean
Gets the value of the lifecycleContainer property. ...

Gets the value of the lifecycleContainer property.

  • 3.6.0

Returns

Modules.Cloud.ACLs
( parameters, callback )
Deletes an ACL object. ...

Deletes an ACL object.

Requires user login.

See Access Control List (ACL): Delete an ACL for the request parameters supported by this method.

Parameters

  • parameters : Dictionary

    Parameters to send in the request.

  • callback : Callback<CloudACLsResponse>

    Callback function to execute when the method completes.

Returns

  • void
Modules.Cloud.ACLs
( parameters, callback )
Removes one or more users from an ACL object. ...

Removes one or more users from an ACL object.

Requires user login.

See Access Control List (ACL): Remove user(s) from an ACL for the request parameters supported by this method.

Parameters

  • parameters : Dictionary

    Parameters to send in the request.

  • callback : Callback<CloudACLsResponse>

    Callback function to execute when the method completes.

Returns

  • void
Sets the value of the bubbleParent property. ...

Sets the value of the bubbleParent property.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Parameters

  • bubbleParent : Boolean

    New value for the property.

Returns

  • void
Sets the value of the lifecycleContainer property. ...

Sets the value of the lifecycleContainer property.

  • 3.6.0

Parameters

Returns

  • void
Modules.Cloud.ACLs
( parameters, callback )
Shows an ACL object. ...

Shows an ACL object.

Requires user login.

See Access Control List (ACL): Show an ACL for the request parameters supported by this method.

Data is returned in the acls property of the parameter passed to the callback.

Parameters

  • parameters : Dictionary

    Parameters to send in the request.

  • callback : Callback<CloudACLsResponse>

    Callback function to execute when the method completes.

Returns

  • void
Modules.Cloud.ACLs
( [parameters], callback )
Updates an ACL object. ...

Updates an ACL object.

Requires user login.

See Access Control List (ACL): Update an ACL for the request parameters supported by this method.

Data is returned in the acls property of the parameter passed to the callback.

Parameters

  • parameters : Dictionary (optional)

    Parameters to send in the request.

  • callback : Callback<CloudACLsResponse>

    Callback function to execute when the method completes.

Returns

  • void