Class UserRoleController
- Namespace
- Oqtane.Controllers
- Assembly
- Oqtane.Server.dll
[Route("api/[controller]")]
public class UserRoleController : Controller
- Inheritance
-
object
ControllerBase
Controller
UserRoleController
Constructors
UserRoleController(IUserRoleRepository, IRoleRepository, IUserPermissions, ITenantManager, ISyncManager, ILogManager)
public UserRoleController(IUserRoleRepository userRoles, IRoleRepository roles, IUserPermissions userPermissions, ITenantManager tenantManager, ISyncManager syncManager, ILogManager logger)
Parameters
userRoles
IUserRoleRepository
roles
IRoleRepository
userPermissions
IUserPermissions
tenantManager
ITenantManager
syncManager
ISyncManager
logger
ILogManager
Methods
Delete(int)
[HttpDelete("{id}")]
[Authorize(Policy = "UserRole:Write:Administrators")]
public void Delete(int id)
Parameters
id
int
Get(int)
[HttpGet("{id}")]
[Authorize(Roles = "Registered Users")]
public UserRole Get(int id)
Parameters
id
int
Returns
- UserRole
Get(string, string, string)
[HttpGet]
[Authorize(Roles = "Registered Users")]
public IEnumerable<UserRole> Get(string siteid, string userid = null, string rolename = null)
Parameters
siteid
string
userid
string
rolename
string
Returns
- IEnumerable<UserRole>
Post(UserRole)
[HttpPost]
[Authorize(Policy = "UserRole:Write:Administrators")]
public UserRole Post(UserRole userRole)
Parameters
userRole
UserRole
Returns
- UserRole
Put(int, UserRole)
[HttpPut("{id}")]
[Authorize(Policy = "UserRole:Write:Administrators")]
public UserRole Put(int id, UserRole userRole)
Parameters
id
int
userRole
UserRole
Returns
- UserRole