Role

Represents a Role on the Parse server. Roles represent groupings of
Users for the purposes of granting permissions (e.g. specifying an ACL
for an Object). Roles are specified by their sets of child users and
child roles, all of which are granted any permissions that the parent
role has.

Roles must have a name (which cannot be changed after creation of the
role), and must specify an ACL.

Returns:

dirty(attr) → {Boolean}

Returns true if this object has been modified since its last
save/refresh. If an attribute is specified, it returns true only if that
particular attribute has been modified since the last save/refresh.

Returns:

getName() → {String}

Returns:

Gets the Parse.Relation for the Parse.Roles that are direct
children of this role. These roles' users are granted any privileges that
this role has been granted (e.g. read or write access through ACLs). You
can add or remove child roles from this role through this relation.

This is equivalent to calling role.relation("roles")

Returns:

Gets the Parse.Relation for the Parse.Users that are direct
children of this role. These users are granted any privileges that this
role has been granted (e.g. read or write access through ACLs). You can
add or remove users from the role through this relation.

Returns:

Returns:

op(attr) → {Parse.Op}

Returns an instance of a subclass of Parse.Op describing what kind of
modification has been performed on this field since the last time it was
saved. For example, after calling object.increment("x"), calling
object.op("x") would return an instance of Parse.Op.Increment.

Returns:

unset(attr)

Parameters:

Name

Type

Description

attr

String

The string name of an attribute.

validate(attrs)

You should not call this function directly unless you subclass
Parse.Object, in which case you can override this method
to provide additional validation on set and
save. Your implementation should return