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

Class SecurityProviderUpgradeProxy

Wraps legacy security providers that implement ISecurityCheck and IRoleManagement in a class that implements ISecurityProvider. All functionality passes directly to the inner provider(s).

Inheritance
System.Object
SecurityProviderUpgradeProxy
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Commerce.Security
Assembly: Mediachase.Commerce.dll
Version: 12.17.2
Syntax
public class SecurityProviderUpgradeProxy : ISecurityProvider, ISecurityCheck, IRoleManagement

Constructors

SecurityProviderUpgradeProxy(ISecurityCheck, IRoleManagement)

Creates a new instance of SecurityProviderUpgradeProxy wrapping instances of ISecurityCheck and IRoleManagement.

Declaration
public SecurityProviderUpgradeProxy(ISecurityCheck securityCheck, IRoleManagement roleManagement)
Parameters
Type Name Description
ISecurityCheck securityCheck

The ISecurityCheck provider to wrap.

IRoleManagement roleManagement

The IRoleManagement provider to wrap.

Exceptions
Type Condition
System.ArgumentNullException

securityCheck or roleManagement is null.

SecurityProviderUpgradeProxy(Object)

Creates a new instance of SecurityProviderUpgradeProxy wrapping a single provider instance that implements both ISecurityCheck and IRoleManagement.

Declaration
public SecurityProviderUpgradeProxy(object securityProvider)
Parameters
Type Name Description
System.Object securityProvider

The provider to wrap.

Exceptions
Type Condition
System.ArgumentNullException

securityProvider is null.

System.InvalidCastException

securityProvider does not implement ISecurityCheck or IRoleManagement.

Properties

PermissionCheckEnable

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

RoleManagementProvider

Gets the underlying IRoleManagement provider instance.

Declaration
public IRoleManagement RoleManagementProvider { get; }
Property Value
Type Description
IRoleManagement

SecurityCheckProvider

Gets the underlying ISecurityCheck provider instance.

Declaration
public ISecurityCheck SecurityCheckProvider { get; }
Property Value
Type Description
ISecurityCheck

Methods

CheckPermission(MembershipUser, String, Object)

Declaration
public bool CheckPermission(MembershipUser user, string permission, object securityObj)
Parameters
Type Name Description
System.Web.Security.MembershipUser user
System.String permission
System.Object securityObj
Returns
Type Description
System.Boolean

CreateRole(String, IEnumerable<SecurityPermission>)

Declaration
public SecurityRole CreateRole(string roleName, IEnumerable<SecurityPermission> permissions)
Parameters
Type Name Description
System.String roleName
System.Collections.Generic.IEnumerable<SecurityPermission> permissions
Returns
Type Description
SecurityRole

CreateUserRoleAssignments(SecurityRoleAssignment)

Declaration
public void CreateUserRoleAssignments(SecurityRoleAssignment roleAssignment)
Parameters
Type Name Description
SecurityRoleAssignment roleAssignment

DeleteRole(String)

Declaration
public void DeleteRole(string roleName)
Parameters
Type Name Description
System.String roleName

DeployPrincipalByUser(MembershipUser)

Declaration
public IEnumerable<Principal> DeployPrincipalByUser(MembershipUser user)
Parameters
Type Name Description
System.Web.Security.MembershipUser user
Returns
Type Description
System.Collections.Generic.IEnumerable<Principal>

GetAllRegisteredRoles()

Declaration
public IEnumerable<SecurityRole> GetAllRegisteredRoles()
Returns
Type Description
System.Collections.Generic.IEnumerable<SecurityRole>

GetPrincipalByUser(MembershipUser)

Declaration
public Principal GetPrincipalByUser(MembershipUser user)
Parameters
Type Name Description
System.Web.Security.MembershipUser user
Returns
Type Description
Principal

GetRoleByName(String)

Declaration
public SecurityRole GetRoleByName(string roleName)
Parameters
Type Name Description
System.String roleName
Returns
Type Description
SecurityRole

ListUserRoleAssigments(MembershipUser)

Declaration
public IEnumerable<SecurityRoleAssignment> ListUserRoleAssigments(MembershipUser user)
Parameters
Type Name Description
System.Web.Security.MembershipUser user
Returns
Type Description
System.Collections.Generic.IEnumerable<SecurityRoleAssignment>

RemoveUserRoleAssignments(SecurityRoleAssignment)

Declaration
public void RemoveUserRoleAssignments(SecurityRoleAssignment roleAssignment)
Parameters
Type Name Description
SecurityRoleAssignment roleAssignment

UpdateRole(SecurityRole)

Declaration
public SecurityRole UpdateRole(SecurityRole role)
Parameters
Type Name Description
SecurityRole role
Returns
Type Description
SecurityRole

Implements