Class 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.
author |
Mohamed Madbouli [email protected] |
---|---|
package |
Parse |
_createACLFromJSON(array $data) : \Parse\ParseACL
_encode() : mixed
mixed
_isShared() : boolean
boolean
_setShared(boolean $shared)
boolean
createACLWithUser(\Parse\ParseUser $user) : \Parse\ParseACL
getAccess(string $accessType, string $userId) : boolean
string
Access name.
string
User id.
boolean
getPublicReadAccess() : boolean
boolean
getPublicWriteAccess() : boolean
boolean
getReadAccess(string $userId) : boolean
Throws |
|
---|
string
User id.
boolean
getRoleReadAccess(\Parse\ParseRole $role) : boolean
getRoleReadAccessWithName(string $roleName) : boolean
string
The name of the role.
boolean
getRoleWriteAccess(\Parse\ParseRole $role) : boolean
getRoleWriteAccessWithName(string $roleName) : boolean
string
The name of the role.
boolean
getUserReadAccess(\Parse\ParseUser $user) : boolean
Even if this returns false, the user may still be able to access it if getPublicReadAccess returns true or a role that the user belongs to has read access.
Throws |
|
---|
\Parse\ParseUser
boolean
getUserWriteAccess(\Parse\ParseUser $user) : boolean
Even if this returns false, the user may still be able to access it if getPublicWriteAccess returns true or a role that the user belongs to has write access.
Throws |
|
---|
\Parse\ParseUser
boolean
getWriteAccess(string $userId) : boolean
Throws |
|
---|
string
User id.
boolean
setAccess(string $accessType, string $userId, boolean $allowed)
Throws |
|
---|
string
Access name.
string
User id.
boolean
If user allowed to access or not.
setDefaultACL(\Parse\ParseACL $acl, boolean $withAccessForCurrentUser)
\Parse\ParseACL
The ACL to use as a template for all ParseObjects created after setDefaultACL has been called. This value will be copied and used as a template for the creation of new ACLs, so changes to the instance after setDefaultACL() has been called will not be reflected in new ParseObjects.
boolean
If true, the ParseACL that is applied to newly-created ParseObjects will provide read and write access to the ParseUser#getCurrentUser() at the time of creation. If false, the provided ACL will be used without modification. If acl is null, this value is ignored.
setPublicReadAccess(boolean $allowed)
boolean
setPublicWriteAccess(boolean $allowed)
boolean
setReadAccess(string $userId, boolean $allowed)
Throws |
|
---|
string
User id.
boolean
If user allowed to read or not.
setRoleReadAccess(\Parse\ParseRole $role, boolean $allowed)
boolean
Whether the given role can read this object.
setRoleReadAccessWithName(string $roleName, boolean $allowed)
string
The name of the role.
boolean
Whether the given role can read this object.
setRoleWriteAccess(\Parse\ParseRole $role, boolean $allowed)
boolean
Whether the given role can read this object.
setRoleWriteAccessWithName(string $roleName, boolean $allowed)
string
The name of the role.
boolean
Whether the given role can write this object.
setUserReadAccess(\Parse\ParseUser $user, boolean $allowed)
setUserWriteAccess(\Parse\ParseUser $user, boolean $allowed)
setWriteAccess(string $userId, boolean $allowed)
Throws |
|
---|
string
User id.
boolean
If user allowed to write or not.
validateRoleState(\Parse\ParseRole $role)
PUBLIC_KEY
shared : boolean
var |
---|
boolean
defaultACLWithCurrentUser : \Parse\ParseACL
defaultACLUsesCurrentUser : boolean
var |
---|
boolean