ParseACL class

A ParseACL is used to control which users can access or modify a particular object. Each ParseObject can have its own ParseACL. You can grant read and write permissions separately to specific users, to groups of users that belong to roles, or you can grant permissions to "the public" so that, for example, any user could read a particular object but only a particular set of users could write to that object.

Constructors

ParseACL()
Creates an ACL with no permissions granted.
ParseACL.fromACL(ParseACL? acl)
Clone an ACL from another ACL.
ParseACL.fromMap(dynamic map)
A helper for creating a ParseACL from the wire. We iterate over it rather than just copying to permissionsById so that we can ensure it's the right format.
factory
ParseACL.fromUser(ParseUser user)
Creates an ACL where only the provided user has access.

Properties

hashCode int
The hash code for this object.
no setterinherited
map → dynamic
Return this ACL into Map format
no setter
publicReadAccess bool
Get whether the public is allowed to read this object.
getter/setter pair
publicWriteAccess bool
Get whether the public is allowed to write this object.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getRoleReadAccess(ParseRole role) bool
Get whether users belonging to the given role are allowed to read this object. Even if this returns false, the role may still be able to read it if a parent role has read access. The role must already be saved on the server and its data must have been fetched in order to use this method.
getRoleWriteAccess(ParseRole role) bool
Get whether users belonging to the given role are allowed to write this object. Even if this returns false, the role may still be able to write it if a parent role has write access. The role must already be saved on the server and its data must have been fetched in order to use this method.
getUserReadAccess(ParseUser user) bool
Get whether the given user is explicitly allowed to read this object. Even if this returns false, the user may still be able to access it if publicReadAccess returns true or a role that the user belongs to has read access.
getUserWriteAccess(ParseUser user) bool
Get whether the given user is explicitly allowed to write this object. Even if this returns false, the user may still be able to write it if publicWriteAccess returns true or a role that the user belongs to has write access.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setRoleReadAccess(ParseRole role, bool allowed) → void
Set whether users belonging to the role with the given roleName are allowed to read this object.
setRoleWriteAccess(ParseRole role, bool allowed) → void
Set whether users belonging to the role with the given roleName are allowed to write this object.
setUserReadAccess(ParseUser user, bool allowed) → void
Set whether the given user is allowed to read this object.
setUserWriteAccess(ParseUser user, bool allowed) → void
Set whether the given user is allowed to write this object.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

defaultACL() Future<ParseACL?>
setDefaultACL(ParseACL acl, bool withAccessForCurrentUser) → void
Sets a default ACL that will be applied to all {@link ParseObject}s when they are created.