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

Class CustomerSecurityProvider

CustomerSecurityProvider

Inheritance
System.Object
CustomerSecurityProvider
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.Customers.Security
Assembly: Mediachase.Commerce.dll
Version: 12.17.2
Syntax
public class CustomerSecurityProvider : ISecurityProvider, ISecurityCheck, IRoleManagement

Constructors

CustomerSecurityProvider()

Initializes a new instance of the CustomerSecurityProvider class.

Declaration
public CustomerSecurityProvider()

Fields

ProviderName

Declaration
public const string ProviderName = "CustomerSecurityProvider"
Field Value
Type Description
System.String

Properties

EnableCaching

Gets or sets a value indicating whether [enable caching].

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

true if [enable caching]; otherwise, false.

PermissionCheckEnable

Gets a value indicating whether [permission check enable].

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

true if [permission check enable]; otherwise, false.

Repository

Declaration
protected virtual ISecurityRepository Repository { get; }
Property Value
Type Description
ISecurityRepository

Methods

CheckPermission(MembershipUser, String, Object)

Checks the permission.

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

The user.

System.String permission

The permission.

System.Object securityObj

The security obj.

Returns
Type Description
System.Boolean

CreateRole(String, IEnumerable<SecurityPermission>)

Creates the role.

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

Name of the role.

System.Collections.Generic.IEnumerable<SecurityPermission> permissions

The permissions.

Returns
Type Description
SecurityRole

CreateUserRoleAssignments(SecurityRoleAssignment)

Creates the user role assignments.

Declaration
public virtual void CreateUserRoleAssignments(SecurityRoleAssignment assignment)
Parameters
Type Name Description
SecurityRoleAssignment assignment

The role assignment.

DeleteRole(String)

Deletes the role.

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

DeployPrincipalByUser(MembershipUser)

Deploys the principal by user.

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

The user.

Returns
Type Description
System.Collections.Generic.IEnumerable<Principal>

GetAllRegisteredRoles()

Gets all roles.

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

GetOwnerFromFromSecurityObject(Object)

Gets the owner from from security object.

Declaration
protected virtual Principal GetOwnerFromFromSecurityObject(object securityObj)
Parameters
Type Name Description
System.Object securityObj

The security obj.

Returns
Type Description
Principal

GetPrincipalByUser(MembershipUser)

Gets the principal by user.

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

The user.

Returns
Type Description
Principal

GetRoleByName(String)

Loads the role.

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

Name of the role.

Returns
Type Description
SecurityRole

GetScopeFromSecurityObject(Object)

Gets the scope from security object.

Declaration
protected virtual SecurityScope GetScopeFromSecurityObject(object securityObj)
Parameters
Type Name Description
System.Object securityObj

The security obj.

Returns
Type Description
SecurityScope

ListUserRoleAssigments(MembershipUser)

Gets all role assignment.

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

The user.

Returns
Type Description
System.Collections.Generic.IEnumerable<SecurityRoleAssignment>

RemoveUserRoleAssignments(SecurityRoleAssignment)

Removes the user role assignments.

Declaration
public virtual void RemoveUserRoleAssignments(SecurityRoleAssignment assignment)
Parameters
Type Name Description
SecurityRoleAssignment assignment

The role assignment.

UpdateRole(SecurityRole)

Updates the role.

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

The role.

Returns
Type Description
SecurityRole

Implements