Show / Hide Table of Contents

    Class PermissionChange

    Objects of this class allow to change permissions of owned Realms. They are created exclusively by the client and are processed by the server as indicated by the status fields.

    Inheritance
    Object
    RealmObject
    PermissionChange
    Inherited Members
    RealmObject.PropertyChanged
    RealmObject.IsManaged
    RealmObject.IsValid
    RealmObject.Realm
    RealmObject.ObjectSchema
    RealmObject.Equals(Object)
    RealmObject.RaisePropertyChanged(String)
    Realms.RealmObject.System.Reflection.IReflectableType.GetTypeInfo()
    Object.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace:Realms.Sync
    Assembly:Realm.Sync.dll
    Syntax
    public class PermissionChange : RealmObject, IReflectableType, INotifyPropertyChanged, ISchemaSource, IPermissionObject
    Remarks

    PermissionChange objects allow to grant and revoke permissions by setting MayRead, MayWrite and MayManage accordingly. If any of these flags are not set, these are merged with either the existing or default permissions as applicable. As a side-effect this causes that the default permissions are permanently materialized for the affected Realm files and the affected user. Once the request has been processed, the Status, StatusMessage, and ErrorCode will be updated accordingly.

    Constructors

    | Improve this Doc View Source

    PermissionChange(String, String, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>)

    Initializes a new instance of the PermissionChange class.

    Declaration
    public PermissionChange(string userId, string realmUrl, bool ? mayRead = null, bool ? mayWrite = null, bool ? mayManage = null)
    Parameters
    Type Name Description
    String userId

    The user or users who should be granted these permission changes. Use * to change permissions for all users.

    String realmUrl

    The Realm URL whose permissions settings should be changed. Use * to change the permissions of all Realms managed by the management Realm's User.

    Nullable<Boolean> mayRead

    Define read access. true or false to request this new value. null to keep current value.

    Nullable<Boolean> mayWrite

    Define write access. true or false to request this new value. null to keep current value.

    Nullable<Boolean> mayManage

    Define manage access. true or false to request this new value. null to keep current value.

    Properties

    | Improve this Doc View Source

    CreatedAt

    Declaration
    [MapTo("createdAt")]
    public DateTimeOffset CreatedAt { get; }
    Property Value
    Type Description
    DateTimeOffset
    Implements
    IPermissionObject.CreatedAt
    | Improve this Doc View Source

    ErrorCode

    Declaration
    public ErrorCode? ErrorCode { get; }
    Property Value
    Type Description
    Nullable<ErrorCode>
    Implements
    IPermissionObject.ErrorCode
    | Improve this Doc View Source

    Id

    Declaration
    [PrimaryKey]
    [Required]
    [MapTo("id")]
    public string Id { get; }
    Property Value
    Type Description
    String
    Implements
    IPermissionObject.Id
    | Improve this Doc View Source

    MayManage

    Gets a value indicating whether the user(s) have manage access to the specified Realm(s).

    Declaration
    [MapTo("mayManage")]
    public bool ? MayManage { get; }
    Property Value
    Type Description
    Nullable<Boolean>

    true or false to request this new value. null to keep current value.

    | Improve this Doc View Source

    MayRead

    Gets a value indicating whether the user(s) have read access to the specified Realm(s).

    Declaration
    [MapTo("mayRead")]
    public bool ? MayRead { get; }
    Property Value
    Type Description
    Nullable<Boolean>

    true or false to request this new value. null to keep current value.

    | Improve this Doc View Source

    MayWrite

    Gets a value indicating whether the user(s) have write access to the specified Realm(s).

    Declaration
    [MapTo("mayWrite")]
    public bool ? MayWrite { get; }
    Property Value
    Type Description
    Nullable<Boolean>

    true or false to request this new value. null to keep current value.

    | Improve this Doc View Source

    RealmUrl

    Gets the Realm to change permissions for.

    Declaration
    [Required]
    [MapTo("realmUrl")]
    public string RealmUrl { get; }
    Property Value
    Type Description
    String

    * to change the permissions of all Realms.

    | Improve this Doc View Source

    Status

    Declaration
    public ManagementObjectStatus Status { get; }
    Property Value
    Type Description
    ManagementObjectStatus
    Implements
    IPermissionObject.Status
    | Improve this Doc View Source

    StatusMessage

    Declaration
    [MapTo("statusMessage")]
    public string StatusMessage { get; }
    Property Value
    Type Description
    String
    Implements
    IPermissionObject.StatusMessage
    | Improve this Doc View Source

    UpdatedAt

    Declaration
    [MapTo("updatedAt")]
    public DateTimeOffset UpdatedAt { get; }
    Property Value
    Type Description
    DateTimeOffset
    Implements
    IPermissionObject.UpdatedAt
    | Improve this Doc View Source

    UserId

    Gets the user or users to effect.

    Declaration
    [Required]
    [MapTo("userId")]
    public string UserId { get; }
    Property Value
    Type Description
    String

    * to change the permissions for all users.

    Methods

    | Improve this Doc View Source

    OnPropertyChanged(String)

    Declaration
    protected override void OnPropertyChanged(string propertyName)
    Parameters
    Type Name Description
    String propertyName
    Overrides
    RealmObject.OnPropertyChanged(String)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2017 Realm
    Generated by DocFX