Try our conversational search powered by Generative AI!

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: 8.11.0
Syntax
public class MappedRole : VirtualRoleProviderBase

Constructors

MappedRole()

Declaration
public MappedRole()

MappedRole(VirtualRoleRepository<VirtualRoleProviderBase>)

Declaration
public MappedRole(VirtualRoleRepository<VirtualRoleProviderBase> repository)
Parameters
Type Name Description
VirtualRoleRepository<VirtualRoleProviderBase> repository

Methods

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.

Exceptions
Type Condition
System.ArgumentNullException

The name of the provider is null.

System.ArgumentException

The name of the provider has a length of zero.

System.InvalidOperationException

An attempt is made to call System.Configuration.Provider.ProviderBase.Initialize(System.String,System.Collections.Specialized.NameValueCollection) on a provider after the provider has already been initialized.

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