NCMBAcl

class NCMBAcl

Access Control (ACL) feature class.

This class is do features on settings Access Control of data for NCMB Kotlin SDK.

Constructors

NCMBAcl
Link copied to clipboard
fun NCMBAcl()

Constructor with class name

NCMBAcl
Link copied to clipboard
fun NCMBAcl(json: JSONObject)

Constructor for NCMBAcl from JSON

Types

Companion
Link copied to clipboard
object Companion
Permission
Link copied to clipboard
class Permission

Inner class of representation for permission

Functions

addRoleKey
Link copied to clipboard
fun addRoleKey(key: String): String
getRoleAccess
Link copied to clipboard
fun getRoleAccess(roleName: String): NCMBAcl.Permission

get role access permissions

getRoleReadAccess
Link copied to clipboard
fun getRoleReadAccess(roleName: String): Boolean

Get whether the gevin role name is allowed to read

getRoleWriteAccess
Link copied to clipboard
fun getRoleWriteAccess(roleName: String): Boolean

Get whether the gevin role name is allowed to write

getUserAccess
Link copied to clipboard
fun getUserAccess(userId: String): NCMBAcl.Permission

get user access permissions

getUserReadAccess
Link copied to clipboard
fun getUserReadAccess(userId: String): Boolean

Get whether the given user id is allowed to read

getUserWriteAccess
Link copied to clipboard
fun getUserWriteAccess(userId: String): Boolean

Get whether the given user id is allowed to write

removeRolePermission
Link copied to clipboard
fun removeRolePermission(roleName: String): Boolean

Remove permisson for role (after set at local OR fetch from server)

removeUserPermission
Link copied to clipboard
fun removeUserPermission(userId: String): Boolean

Remove permission for user (after set at local OR fetch from server)

setRoleAccess
Link copied to clipboard
fun setRoleAccess(roleName: String, permission: NCMBAcl.Permission)

set role access permissions

setRoleReadAccess
Link copied to clipboard
fun setRoleReadAccess(roleName: String, allowed: Boolean)

Set whether the given role is allowed to read.

setRoleWriteAccess
Link copied to clipboard
fun setRoleWriteAccess(roleName: String, allowed: Boolean)

Set whether the given role is allowed to write.

setUserAccess
Link copied to clipboard
fun setUserAccess(userId: String, permission: NCMBAcl.Permission)

set user access permissions

setUserReadAccess
Link copied to clipboard
fun setUserReadAccess(userId: String, allowed: Boolean)

Set whether the given user id is allowed to read.

setUserWriteAccess
Link copied to clipboard
fun setUserWriteAccess(userId: String, allowed: Boolean)

Set whether the given user is allowed to write.

Properties

isEmpty
Link copied to clipboard
val isEmpty: Boolean

Check ACL is empty or not

publicReadAccess
Link copied to clipboard
var publicReadAccess: Boolean

Set whether the public is allowed to read.

publicWriteAccess
Link copied to clipboard
var publicWriteAccess: Boolean

Set whether the public is allowed to write.