• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class TestableRoleController

Inheritance
System.Object
ServiceLocator<IRoleController, TestableRoleController>
TestableRoleController
Implements
IRoleController
Inherited Members
ServiceLocator<IRoleController, TestableRoleController>.Instance
ServiceLocator<IRoleController, TestableRoleController>.Factory
ServiceLocator<IRoleController, TestableRoleController>.SetTestableInstance(IRoleController)
ServiceLocator<IRoleController, TestableRoleController>.ClearInstance()
ServiceLocator<IRoleController, TestableRoleController>.GetFactory()
Namespace: DotNetNuke.Security.Roles.Internal
Assembly: DotNetNuke.dll
Syntax
public class TestableRoleController : ServiceLocator<IRoleController, TestableRoleController>, IRoleController

Methods

| Improve this Doc View Source

AddRole(RoleInfo, Boolean)

Adds a role.

Declaration
public int AddRole(RoleInfo role, bool addToExistUsers)
Parameters
Type Name Description
RoleInfo role

The Role to Add.

System.Boolean addToExistUsers

Add this role on all exist users if auto assignment is true.

Returns
Type Description
System.Int32

The Id of the new role.

| Improve this Doc View Source

AddRole(RoleInfo)

Adds a role.

Declaration
public int AddRole(RoleInfo role)
Parameters
Type Name Description
RoleInfo role

The Role to Add.

Returns
Type Description
System.Int32

The Id of the new role.

| Improve this Doc View Source

ClearRoleCache(Int32)

Clears Roles cache for the passed portal ID and for the default ID (-1) as well.

Declaration
public void ClearRoleCache(int portalId)
Parameters
Type Name Description
System.Int32 portalId

Id of the portal.

| Improve this Doc View Source

DeleteRole(RoleInfo)

Deletes a role.

Declaration
public void DeleteRole(RoleInfo role)
Parameters
Type Name Description
RoleInfo role

The Role to delete.

| Improve this Doc View Source

GetFactory()

Gets the service locator factory.

Declaration
protected override Func<IRoleController> GetFactory()
Returns
Type Description
Func<IRoleController>

A factory function.

Overrides
DotNetNuke.Framework.ServiceLocator<DotNetNuke.Security.Roles.Internal.IRoleController, DotNetNuke.Security.Roles.Internal.TestableRoleController>.GetFactory()
| Improve this Doc View Source

GetRole(Int32, Func<RoleInfo, Boolean>)

Fetch a single role based on a predicate.

Declaration
public RoleInfo GetRole(int portalId, Func<RoleInfo, bool> predicate)
Parameters
Type Name Description
System.Int32 portalId

Id of the portal.

Func<RoleInfo, System.Boolean> predicate

The predicate (criteria) required.

Returns
Type Description
RoleInfo

A RoleInfo object.

| Improve this Doc View Source

GetRoles(Int32, Func<RoleInfo, Boolean>)

Get the roles based on a predicate.

Declaration
public IList<RoleInfo> GetRoles(int portalId, Func<RoleInfo, bool> predicate)
Parameters
Type Name Description
System.Int32 portalId

Id of the portal.

Func<RoleInfo, System.Boolean> predicate

The predicate (criteria) required.

Returns
Type Description
IList<RoleInfo>

A List of RoleInfo objects.

| Improve this Doc View Source

GetRoles(Int32)

Obtains a list of roles from the cache (or for the database if the cache has expired).

Declaration
public IList<RoleInfo> GetRoles(int portalId)
Parameters
Type Name Description
System.Int32 portalId

The id of the portal.

Returns
Type Description
IList<RoleInfo>

The list of roles.

| Improve this Doc View Source

GetRolesBasicSearch(Int32, Int32, String)

get a list of roles based on progressive search.

Declaration
public IList<RoleInfo> GetRolesBasicSearch(int portalID, int pageSize, string filterBy)
Parameters
Type Name Description
System.Int32 portalID

the id of the portal.

System.Int32 pageSize

the number of items to return.

System.String filterBy

the text used to trim data.

Returns
Type Description
IList<RoleInfo>

An of RoleInfo instances.

| Improve this Doc View Source

GetRoleSettings(Int32)

Gets the settings for a role.

Declaration
public IDictionary<string, string> GetRoleSettings(int roleId)
Parameters
Type Name Description
System.Int32 roleId

Id of the role.

Returns
Type Description
IDictionary<System.String, System.String>

A Dictionary of settings.

| Improve this Doc View Source

UpdateRole(RoleInfo, Boolean)

Persists a role to the Data Store.

Declaration
public void UpdateRole(RoleInfo role, bool addToExistUsers)
Parameters
Type Name Description
RoleInfo role

The role to persist.

System.Boolean addToExistUsers

Add this role on all exist users if auto assignment is true.

| Improve this Doc View Source

UpdateRole(RoleInfo)

Persists a role to the Data Store.

Declaration
public void UpdateRole(RoleInfo role)
Parameters
Type Name Description
RoleInfo role

The role to persist.

| Improve this Doc View Source

UpdateRoleSettings(RoleInfo, Boolean)

Update the role settings.

Declaration
public void UpdateRoleSettings(RoleInfo role, bool clearCache)
Parameters
Type Name Description
RoleInfo role

The Role.

System.Boolean clearCache

A flag that indicates whether the cache should be cleared.

Implements

IRoleController

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS