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

Interface IRoleController

Namespace: DotNetNuke.Security.Roles.Internal
Assembly: DotNetNuke.dll
Syntax
public interface IRoleController

Methods

| Improve this Doc View Source

AddRole(RoleInfo, Boolean)

Adds a role.

Declaration
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
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
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
void DeleteRole(RoleInfo role)
Parameters
Type Name Description
RoleInfo role

The Role to delete.

| Improve this Doc View Source

GetRole(Int32, Func<RoleInfo, Boolean>)

Fetch a single role based on a predicate.

Declaration
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
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
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
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
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
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
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
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.

Extension Methods

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