user

fun user(name: String, get: Boolean = false, create: Boolean = false, update: Boolean = false, delete: Boolean = false, projection: String? = null): DataSyncGrantType

Grants DataSync REST CRUD on a user record. The permission bits land in the plain users bucket.

Parameters

projection

the single projection the token holder looks through for this user's REST reads, or null for the implicit __default__ projection. Emitted into the token meta as the pn-projections entry datasync:users:<name>. It does not affect realtime subscribe (see subscribe). A named projection only has an effect for users of a custom User subclass that declares it: the built-in User class exposes its fields through __default__ only. parseToken returns it in PNToken.projections.resources.users (patterns.users for userPattern).