November Happy Hour will be moved to Thursday December 5th.

Class MappedRole

Map one role to several roles in the system. roles : Comma separated list of roles. E.g, WebAdmins, WebEditors mode : Any or All, Default is Any. If Any is set the principal only has to be a member of one of the roles specifed.

Inheritance
System.Object
MappedRole
Namespace: EPiServer.Security
Assembly: EPiServer.Framework.dll
Version: 12.0.3
Syntax
public class MappedRole : VirtualRoleProviderBase

Constructors

MappedRole()

Creates a new instance of MappedRole

Declaration
public MappedRole()

MappedRole(IVirtualRoleRepository)

Creates a new instance of MappedRole

Declaration
public MappedRole(IVirtualRoleRepository repository)
Parameters
Type Name Description
IVirtualRoleRepository repository

Properties

Roles

A list of roles this role is mapped to.

Declaration
public IEnumerable<string> Roles { get; set; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.String>

ShouldMatchAll

Specifies if all mapped roles must match to be considered part of this role

Declaration
public bool ShouldMatchAll { get; set; }
Property Value
Type Description
System.Boolean

Methods

Initialize(String, MappedRoleOptions)

Initializes the MappedRole.

Declaration
public void Initialize(string name, MappedRoleOptions options)
Parameters
Type Name Description
System.String name

The friendly name of the provider.

MappedRoleOptions options

The set of options that should be used by this role.

Initialize(String, NameValueCollection)

Initializes the provider.

Declaration
public override void Initialize(string name, NameValueCollection config)
Parameters
Type Name Description
System.String name

The friendly name of the provider.

System.Collections.Specialized.NameValueCollection config

A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.

Overrides

IsInVirtualRole(IPrincipal, Object)

Determines whether the specified principal is a member of the roles specified.

Declaration
public override bool IsInVirtualRole(IPrincipal principal, object context)
Parameters
Type Name Description
System.Security.Principal.IPrincipal principal

The principal.

System.Object context

External context.

Returns
Type Description
System.Boolean

true if the specified principal is a member of the roles specified; otherwise, false.

Overrides

Extension Methods