Show / Hide Table of Contents

    Class PermissionCondition

    A class describing the condition based on which permissions will be applied.

    Inheritance
    Object
    PermissionCondition
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace:Realms.Sync
    Assembly:Realm.Sync.dll
    Syntax
    public abstract class PermissionCondition

    Properties

    | Improve this Doc View Source

    Default

    Gets a PermissionCondition that describes the default permissions for all users who don't have explicit permissions applied. The AccessLevel granted alongside this condition will also be used as default access level for future new users.

    Declaration
    public static PermissionCondition Default { get; }
    Property Value
    Type Description
    PermissionCondition
    Remarks

    The default permissions are not additive with more specific permissions, even if the latter are more restrictive - for example, a user who has been granted Read access will not be write to a Realm, even if the default permissions grant Write access.

    Methods

    | Improve this Doc View Source

    Email(String)

    Apply permissions based on the user's Email when using the username/password login provider.

    Declaration
    public static PermissionCondition Email(string email)
    Parameters
    Type Name Description
    String email

    The email (username) of the user that will be affected by this condition.

    Returns
    Type Description
    PermissionCondition

    A PermissionCondition containing information about the user's email.

    | Improve this Doc View Source

    KeyValue(String, String)

    Apply permissions based on a key/value combination in the user's metadata.

    Declaration
    public static PermissionCondition KeyValue(string key, string value)
    Parameters
    Type Name Description
    String key

    The metadata key to look for.

    String value

    The metadata value that must match the key.

    Returns
    Type Description
    PermissionCondition

    A PermissionCondition containing information about the key/value combination that will be used for matching against.

    | Improve this Doc View Source

    UserId(String)

    Apply permissions based on the user's Id.

    Declaration
    public static PermissionCondition UserId(string userId)
    Parameters
    Type Name Description
    String userId

    The Id of the user.

    Returns
    Type Description
    PermissionCondition

    A PermissionCondition containing information about the user's Id.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2017 Realm
    Generated by DocFX