Class VirtualRoleOptions
Specifies how Virtual roles should be setup.
Inheritance
Implements
Namespace: EPiServer.Security
Assembly: EPiServer.Framework.dll
Version: 12.0.3Syntax
[Options(ConfigurationSection = "Cms")]
public class VirtualRoleOptions : Object, IReplicationType
Constructors
VirtualRoleOptions()
Declaration
public VirtualRoleOptions()
Properties
Roles
List of all virtual roles that should be setup by the system.
Declaration
public IDictionary<string, VirtualRoleBuilder> Roles { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, VirtualRoleBuilder> |
Methods
AddMappedRole(String, IEnumerable<String>, Boolean)
Adds a mapping from one role to one or many other roles.
Declaration
public VirtualRoleOptions AddMappedRole(string name, IEnumerable<string> mappedRoles, bool shouldMatchAll = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the role that should be mapped to the provided roles. |
System.Collections.Generic.IEnumerable<System.String> | mappedRoles | All roles that should be mapped to the name. |
System.Boolean | shouldMatchAll | Specifies if all mapped roles must match to be considered part of this role |
Returns
Type | Description |
---|---|
VirtualRoleOptions |
AddMappedRole(String, String)
Adds a mapping from one role to one or many other roles.
Declaration
public VirtualRoleOptions AddMappedRole(string name, string mappedRole)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the role that should be mapped to the provided roles. |
System.String | mappedRole | A role that should be mapped to the name. |
Returns
Type | Description |
---|---|
VirtualRoleOptions |
AddRole<TRole>(String)
Adds a VirtualRoleProviderBase of the given type.
Declaration
public VirtualRoleOptions AddRole<TRole>(string name)
where TRole : VirtualRoleProviderBase
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the role to add. |
Returns
Type | Description |
---|---|
VirtualRoleOptions |
Type Parameters
Name | Description |
---|---|
TRole | The type of VirtualRoleProviderBase to add. |
AddRole<TRole, TRoleOptions>(String, Action<TRoleOptions>)
Adds a VirtualRoleProviderBase of the given type using the provided method to configure the role options.
Declaration
public VirtualRoleOptions AddRole<TRole, TRoleOptions>(string name, Action<TRoleOptions> configure)
where TRole : VirtualRoleProviderBase where TRoleOptions : class, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the role to add. |
System.Action<TRoleOptions> | configure | Configuration method for setting up role options. |
Returns
Type | Description |
---|---|
VirtualRoleOptions |
Type Parameters
Name | Description |
---|---|
TRole | The type of VirtualRoleProviderBase to add. |
TRoleOptions | The type of the options class expected by the specific role type. |
Explicit Interface Implementations
IReplicationType.ReplicationType
Declaration
string IReplicationType.ReplicationType { get; set; }
Returns
Type | Description |
---|---|
System.String |