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.
Inherited Members
Namespace: EPiServer.Security
Assembly: EPiServer.Framework.dll
Version: 9.12.2Syntax
public class MappedRole : VirtualRoleProviderBase
Constructors
MappedRole()
Declaration
public MappedRole()
MappedRole(IVirtualRoleRepository)
Declaration
public MappedRole(IVirtualRoleRepository repository)
Parameters
Type | Name | Description |
---|---|---|
IVirtualRoleRepository | repository |
MappedRole(VirtualRoleRepository<VirtualRoleProviderBase>)
Declaration
[Obsolete("Use alternative constructor")]
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 |
|