Table of Contents

Interface IUserRoleService

Namespace
Oqtane.Services
Assembly
Oqtane.Client.dll

Manage Roles assigned to a specific User

public interface IUserRoleService

Methods

AddUserRoleAsync(UserRole)

Save a new UserRole

Task<UserRole> AddUserRoleAsync(UserRole userRole)

Parameters

userRole UserRole

Returns

Task<UserRole>

DeleteUserRoleAsync(int)

Delete a UserRole in the database

Task DeleteUserRoleAsync(int userRoleId)

Parameters

userRoleId int

Returns

Task

GetUserRoleAsync(int)

Get one specific UserRole

Task<UserRole> GetUserRoleAsync(int userRoleId)

Parameters

userRoleId int

ID-reference to a UserRole

Returns

Task<UserRole>

GetUserRolesAsync(int)

Get all UserRoles on a Site

Task<List<UserRole>> GetUserRolesAsync(int siteId)

Parameters

siteId int

ID-reference to a Site

Returns

Task<List<UserRole>>

GetUserRolesAsync(int, int)

Get all UserRoles on a Site

Task<List<UserRole>> GetUserRolesAsync(int siteId, int userId)

Parameters

siteId int

ID-reference to a Site

userId int

ID-reference to a User

Returns

Task<List<UserRole>>

GetUserRolesAsync(int, int, string)

Get all UserRoles on a Site

Task<List<UserRole>> GetUserRolesAsync(int siteId, int userId, string roleName)

Parameters

siteId int

ID-reference to a Site

userId int

ID-reference to a User

roleName string

Name reference a Role

Returns

Task<List<UserRole>>

GetUserRolesAsync(int, string)

Get all UserRoles on a Site

Task<List<UserRole>> GetUserRolesAsync(int siteId, string roleName)

Parameters

siteId int

ID-reference to a Site

roleName string

Name reference a Role

Returns

Task<List<UserRole>>

UpdateUserRoleAsync(UserRole)

Update a UserRole in the database

Task<UserRole> UpdateUserRoleAsync(UserRole userRole)

Parameters

userRole UserRole

Returns

Task<UserRole>