LeanCloud C# SDK
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Properties | List of all members
LeanCloud.Storage.LCACL Class Reference

LCACL is used to control which users and roles can access or modify a particular object. Each LCObject can have its own LCACL. More...

Public Member Functions

bool GetUserIdReadAccess (string userId)
 Detects whether the given user id is explicitly allowed to read this object. Even if this returns false, the user may still be able to read it if PublicReadAccess is true or a role that the user belongs to has read access.
 
void SetUserIdReadAccess (string userId, bool value)
 Set whether the given user id is allowed to read this object.
 
bool GetUserIdWriteAccess (string userId)
 Detects whether the given user id is explicitly allowed to write this object. Even if this returns false, the user may still be able to write it if PublicWriteAccess is true or a role that the user belongs to has read access.
 
void SetUserIdWriteAccess (string userId, bool value)
 Set whether the given user id is allowed to write this object.
 
bool GetUserReadAccess (LCUser user)
 Detects whether the given user is explicitly allowed to read this object. Even if this returns false, the user may still be able to read it if PublicReadAccess is true or a role that the user belongs to has read access.
 
void SetUserReadAccess (LCUser user, bool value)
 Set whether the given user is allowed to read this object.
 
bool GetUserWriteAccess (LCUser user)
 Detects 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 PublicReadAccess is true or a role that the user belongs to has write access.
 
void SetUserWriteAccess (LCUser user, bool value)
 Set whether the given user is allowed to write this object.
 
bool GetRoleReadAccess (LCRole role)
 Detects whether the given role are allowed to read this object.
 
void SetRoleReadAccess (LCRole role, bool value)
 Sets whether the given role are allowed to read this object.
 
bool GetRoleWriteAccess (LCRole role)
 Detects whether the given role are allowed to write this object.
 
void SetRoleWriteAccess (LCRole role, bool value)
 Sets whether the given role are allowed to write this object.
 

Static Public Member Functions

static LCACL CreateWithOwner (LCUser owner)
 Creates a LCACL that is allowed to read and write this object for the user.
 

Properties

bool PublicReadAccess [get, set]
 Gets or sets whether everyone is allowed to read this object.
 
bool PublicWriteAccess [get, set]
 Gets or sets whether everyone is allowed to write this object.
 

Detailed Description

LCACL is used to control which users and roles can access or modify a particular object. Each LCObject can have its own LCACL.

Member Function Documentation

◆ CreateWithOwner()

static LCACL LeanCloud.Storage.LCACL.CreateWithOwner ( LCUser  owner)
inlinestatic

Creates a LCACL that is allowed to read and write this object for the user.

Parameters
ownerThe user.
Returns

◆ GetRoleReadAccess()

bool LeanCloud.Storage.LCACL.GetRoleReadAccess ( LCRole  role)
inline

Detects whether the given role are allowed to read this object.

Parameters
roleThe role to check.
Returns

◆ GetRoleWriteAccess()

bool LeanCloud.Storage.LCACL.GetRoleWriteAccess ( LCRole  role)
inline

Detects whether the given role are allowed to write this object.

Parameters
roleThe role to check.
Returns

◆ GetUserIdReadAccess()

bool LeanCloud.Storage.LCACL.GetUserIdReadAccess ( string  userId)
inline

Detects whether the given user id is explicitly allowed to read this object. Even if this returns false, the user may still be able to read it if PublicReadAccess is true or a role that the user belongs to has read access.

Parameters
userIdThe user ObjectId to check.
Returns

◆ GetUserIdWriteAccess()

bool LeanCloud.Storage.LCACL.GetUserIdWriteAccess ( string  userId)
inline

Detects whether the given user id is explicitly allowed to write this object. Even if this returns false, the user may still be able to write it if PublicWriteAccess is true or a role that the user belongs to has read access.

Parameters
userIdT

◆ GetUserReadAccess()

bool LeanCloud.Storage.LCACL.GetUserReadAccess ( LCUser  user)
inline

Detects whether the given user is explicitly allowed to read this object. Even if this returns false, the user may still be able to read it if PublicReadAccess is true or a role that the user belongs to has read access.

Parameters
userThe user to check.
Returns

◆ GetUserWriteAccess()

bool LeanCloud.Storage.LCACL.GetUserWriteAccess ( LCUser  user)
inline

Detects 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 PublicReadAccess is true or a role that the user belongs to has write access.

Parameters
userIdThe user to check.
Returns

◆ SetRoleReadAccess()

void LeanCloud.Storage.LCACL.SetRoleReadAccess ( LCRole  role,
bool  value 
)
inline

Sets whether the given role are allowed to read this object.

Parameters
roleThe role.
valueWhether the role has access.

◆ SetRoleWriteAccess()

void LeanCloud.Storage.LCACL.SetRoleWriteAccess ( LCRole  role,
bool  value 
)
inline

Sets whether the given role are allowed to write this object.

Parameters
roleThe role.
valueWhether the role has access.

◆ SetUserIdReadAccess()

void LeanCloud.Storage.LCACL.SetUserIdReadAccess ( string  userId,
bool  value 
)
inline

Set whether the given user id is allowed to read this object.

Parameters
userIdThe ObjectId of the user.
valueWhether the user has permission.

◆ SetUserIdWriteAccess()

void LeanCloud.Storage.LCACL.SetUserIdWriteAccess ( string  userId,
bool  value 
)
inline

Set whether the given user id is allowed to write this object.

Parameters
userIdThe ObjectId of the user.
valueWhether the user has permission.

◆ SetUserReadAccess()

void LeanCloud.Storage.LCACL.SetUserReadAccess ( LCUser  user,
bool  value 
)
inline

Set whether the given user is allowed to read this object.

Parameters
userThe user.
valueWhether the user has permission.

◆ SetUserWriteAccess()

void LeanCloud.Storage.LCACL.SetUserWriteAccess ( LCUser  user,
bool  value 
)
inline

Set whether the given user is allowed to write this object.

Parameters
userThe user.
valueWhether the user has permission.

Property Documentation

◆ PublicReadAccess

bool LeanCloud.Storage.LCACL.PublicReadAccess
getset

Gets or sets whether everyone is allowed to read this object.

◆ PublicWriteAccess

bool LeanCloud.Storage.LCACL.PublicWriteAccess
getset

Gets or sets whether everyone is allowed to write this object.


The documentation for this class was generated from the following file: