This service is available via Telligent.Evolution.Extensibility.Apis.Get<Telligent.Evolution.Extensibility.Api.Version1.IRoleUsers>()
and is defined in Telligent.Evolution.Platform.dll
Events
Events.AfterCreate
Handler
void RoleUserAfterCreateEventHandler(RoleUserAfterCreateEventArgs e);
Events.AfterDelete
Handler
void RoleUserAfterDeleteEventHandler(RoleUserAfterDeleteEventArgs e);
Events.BeforeCreate
Handler
void RoleUserBeforeCreateEventHandler(RoleUserBeforeCreateEventArgs e);
Events.BeforeDelete
Handler
void RoleUserBeforeDeleteEventHandler(RoleUserBeforeDeleteEventArgs e);
Methods
AdditionalInfo AddUserToRole(RoleUserCreateOptions options);
Add a user to a role
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | RoleUserCreateOptions | Options include UserId, Username, RoleId and RoleName. Must include UserId or Username. Must include RoleId or RoleName. | Required |
Return Type
bool IsUserInRoles(string username, string[] roleNames);
Checks if a user is in a role or roles
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
username | string | User name | Required | ||
roleNames | string[] | Role names | Required |
Return Type
bool
AdditionalInfo RemoveUserFromRole(int roleId, RoleUserDeleteOptions options);
Remove a user from a role
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
roleId | int | Role Id | Required | ||
options | RoleUserDeleteOptions | Options include UserId and Username. Must include UserId or Username. | Required |