Show / Hide Table of Contents

    Class PermissionRole

    A Role within the permissions system.

    Inheritance
    Object
    RealmObject
    PermissionRole
    Implements
    INotifyPropertyChanged
    ISchemaSource
    IReflectableType
    Inherited Members
    RealmObject.PropertyChanged
    RealmObject.IsManaged
    RealmObject.IsValid
    RealmObject.IsFrozen
    RealmObject.Realm
    RealmObject.ObjectSchema
    RealmObject.BacklinksCount
    RealmObject.FreezeInPlace()
    RealmObject.RaisePropertyChanged(String)
    RealmObject.OnPropertyChanged(String)
    RealmObject.OnManaged()
    Namespace: Realms.Sync
    Assembly: Realm.dll
    Syntax
    [MapTo("__Role")]
    public class PermissionRole : RealmObject, INotifyPropertyChanged, ISchemaSource, IThreadConfined, NotificationsHelper.INotifiable, IReflectableType
    Remarks

    A Role consists of a name for the role and a list of users which are members of the role. Roles are granted privileges on Realms, Classes and Objects, and in turn grant those privileges to all users which are members of the role.

    A role named "everyone" is automatically created in new Realms, and all new users which connect to the Realm are automatically added to it. Any other roles you wish to use are managed as normal Realm objects.

    Properties

    | Improve this Doc View Source

    Name

    Gets the name of the Role.

    Declaration
    [MapTo("name")]
    [PrimaryKey]
    [Required]
    public string Name { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Users

    Gets the users which belong to the role.

    Declaration
    [MapTo("members")]
    public IList<PermissionUser> Users { get; }
    Property Value
    Type Description
    IList<PermissionUser>

    Methods

    | Improve this Doc View Source

    Get(Realm, String)

    Gets or creates a PermissionRole in the provided Realm.

    Declaration
    public static PermissionRole Get(Realm realm, string roleName)
    Parameters
    Type Name Description
    Realm realm

    The Realm where the Role will be created.

    String roleName

    The name of the Role.

    Returns
    Type Description
    PermissionRole

    A PermissionRole instance that can be inspected or manipulated.

    Implements

    System.ComponentModel.INotifyPropertyChanged
    ISchemaSource
    System.Reflection.IReflectableType

    Extension Methods

    FrozenObjectsExtensions.Freeze<T>(T)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Realm
    Generated by DocFX