Class DNNRoleProvider
The DNNRoleProvider overrides the default MembershipProvider to provide a purely DNN Membership Component implementation.
Inherited Members
Namespace: DotNetNuke.Security.Roles
Assembly: DotNetNuke.dll
Syntax
public class DNNRoleProvider : RoleProvider
Methods
| Improve this Doc View SourceAddUserToRole(Int32, UserInfo, UserRoleInfo)
AddUserToRole adds a User to a Role.
Declaration
public override bool AddUserToRole(int portalId, UserInfo user, UserRoleInfo userRole)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Id of the portal. |
UserInfo | user | The user to add. |
UserRoleInfo | userRole | The role to add the user to. |
Returns
Type | Description |
---|---|
System.Boolean | A Boolean indicating success or failure. |
Overrides
| Improve this Doc View SourceCreateRole(RoleInfo)
CreateRole persists a Role to the Data Store.
Declaration
public override bool CreateRole(RoleInfo role)
Parameters
Type | Name | Description |
---|---|---|
RoleInfo | role | The role to persist to the Data Store. |
Returns
Type | Description |
---|---|
System.Boolean | A Boolean indicating success or failure. |
Overrides
| Improve this Doc View SourceCreateRoleGroup(RoleGroupInfo)
CreateRoleGroup persists a RoleGroup to the Data Store.
Declaration
public override int CreateRoleGroup(RoleGroupInfo roleGroup)
Parameters
Type | Name | Description |
---|---|---|
RoleGroupInfo | roleGroup | The RoleGroup to persist to the Data Store. |
Returns
Type | Description |
---|---|
System.Int32 | The Id of the new role. |
Overrides
| Improve this Doc View SourceDeleteRole(RoleInfo)
DeleteRole deletes a Role from the Data Store.
Declaration
public override void DeleteRole(RoleInfo role)
Parameters
Type | Name | Description |
---|---|---|
RoleInfo | role | The role to delete from the Data Store. |
Overrides
| Improve this Doc View SourceDeleteRoleGroup(RoleGroupInfo)
DeleteRoleGroup deletes a RoleGroup from the Data Store.
Declaration
public override void DeleteRoleGroup(RoleGroupInfo roleGroup)
Parameters
Type | Name | Description |
---|---|---|
RoleGroupInfo | roleGroup | The RoleGroup to delete from the Data Store. |
Overrides
| Improve this Doc View SourceGetRoleGroup(Int32, Int32)
GetRoleGroup gets a RoleGroup from the Data Store.
Declaration
public override RoleGroupInfo GetRoleGroup(int portalId, int roleGroupId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Id of the portal. |
System.Int32 | roleGroupId | The Id of the RoleGroup to retrieve. |
Returns
Type | Description |
---|---|
RoleGroupInfo | A RoleGroupInfo object. |
Overrides
| Improve this Doc View SourceGetRoleGroupByName(Int32, String)
The DNNRoleProvider overrides the default MembershipProvider to provide a purely DNN Membership Component implementation.
Declaration
public override RoleGroupInfo GetRoleGroupByName(int portalId, string roleGroupName)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | |
System.String | roleGroupName |
Returns
Type | Description |
---|---|
RoleGroupInfo |
Overrides
| Improve this Doc View SourceGetRoleGroups(Int32)
Get the RoleGroups for a portal.
Declaration
public override ArrayList GetRoleGroups(int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Id of the portal. |
Returns
Type | Description |
---|---|
ArrayList | An ArrayList of RoleGroupInfo objects. |
Overrides
| Improve this Doc View SourceGetRoles(Int32)
Get the roles for a portal.
Declaration
public override ArrayList GetRoles(int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Id of the portal (If -1 all roles for all portals are retrieved. |
Returns
Type | Description |
---|---|
ArrayList | An ArrayList of RoleInfo objects. |
Overrides
| Improve this Doc View SourceGetRolesBasicSearch(Int32, Int32, String)
The DNNRoleProvider overrides the default MembershipProvider to provide a purely DNN Membership Component implementation.
Declaration
public override IList<RoleInfo> GetRolesBasicSearch(int portalID, int pageSize, string filterBy)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalID | |
System.Int32 | pageSize | |
System.String | filterBy |
Returns
Type | Description |
---|---|
IList<RoleInfo> |
Overrides
| Improve this Doc View SourceGetRoleSettings(Int32)
The DNNRoleProvider overrides the default MembershipProvider to provide a purely DNN Membership Component implementation.
Declaration
public override IDictionary<string, string> GetRoleSettings(int roleId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | roleId |
Returns
Type | Description |
---|---|
IDictionary<System.String, System.String> |
Overrides
| Improve this Doc View SourceGetUserRole(Int32, Int32, Int32)
GetUserRole gets a User/Role object from the Data Store.
Declaration
public override UserRoleInfo GetUserRole(int portalId, int userId, int roleId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Id of the portal. |
System.Int32 | userId | The Id of the User. |
System.Int32 | roleId | The Id of the Role. |
Returns
Type | Description |
---|---|
UserRoleInfo | The UserRoleInfo object. |
Overrides
| Improve this Doc View SourceGetUserRoles(UserInfo, Boolean)
Gets a list of UserRoles for the user.
Declaration
public override IList<UserRoleInfo> GetUserRoles(UserInfo user, bool includePrivate)
Parameters
Type | Name | Description |
---|---|---|
UserInfo | user | A UserInfo object representaing the user. |
System.Boolean | includePrivate | Include private roles. |
Returns
Type | Description |
---|---|
IList<UserRoleInfo> | A list of UserRoleInfo objects. |
Overrides
| Improve this Doc View SourceGetUserRoles(Int32, String, String)
GetUserRoles gets a collection of User/Role objects from the Data Store.
Declaration
public override ArrayList GetUserRoles(int portalId, string userName, string roleName)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Id of the portal. |
System.String | userName | The user to fetch roles for. |
System.String | roleName | The role to fetch users for. |
Returns
Type | Description |
---|---|
ArrayList | An ArrayList of UserRoleInfo objects. |
Overrides
| Improve this Doc View SourceGetUsersByRoleName(Int32, String)
Get the users in a role (as User objects).
Declaration
public override ArrayList GetUsersByRoleName(int portalId, string roleName)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Id of the portal (If -1 all roles for all portals are retrieved. |
System.String | roleName | The role to fetch users for. |
Returns
Type | Description |
---|---|
ArrayList | An ArrayList of UserInfo objects. |
Overrides
| Improve this Doc View SourceRemoveUserFromRole(Int32, UserInfo, UserRoleInfo)
Remove a User from a Role.
Declaration
public override void RemoveUserFromRole(int portalId, UserInfo user, UserRoleInfo userRole)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Id of the portal. |
UserInfo | user | The user to remove. |
UserRoleInfo | userRole | The role to remove the user from. |
Overrides
| Improve this Doc View SourceUpdateRole(RoleInfo)
Update a role.
Declaration
public override void UpdateRole(RoleInfo role)
Parameters
Type | Name | Description |
---|---|---|
RoleInfo | role | The role to update. |
Overrides
| Improve this Doc View SourceUpdateRoleGroup(RoleGroupInfo)
Update a RoleGroup.
Declaration
public override void UpdateRoleGroup(RoleGroupInfo roleGroup)
Parameters
Type | Name | Description |
---|---|---|
RoleGroupInfo | roleGroup | The RoleGroup to update. |
Overrides
| Improve this Doc View SourceUpdateRoleSettings(RoleInfo)
Update the role settings for a role.
Declaration
public override void UpdateRoleSettings(RoleInfo role)
Parameters
Type | Name | Description |
---|---|---|
RoleInfo | role | The role to update. |
Overrides
| Improve this Doc View SourceUpdateUserRole(UserRoleInfo)
Updates a User/Role.
Declaration
public override void UpdateUserRole(UserRoleInfo userRole)
Parameters
Type | Name | Description |
---|---|---|
UserRoleInfo | userRole | The User/Role to update. |