Table of Contents

Class RoleController

Namespace
Oqtane.Controllers
Assembly
Oqtane.Server.dll
[Route("api/[controller]")]
public class RoleController : Controller
Inheritance
object
ControllerBase
Controller
RoleController

Constructors

RoleController(IRoleRepository, ISyncManager, ILogManager, ITenantManager)

public RoleController(IRoleRepository roles, ISyncManager syncManager, ILogManager logger, ITenantManager tenantManager)

Parameters

roles IRoleRepository
syncManager ISyncManager
logger ILogManager
tenantManager ITenantManager

Methods

Delete(int)

[HttpDelete("{id}")]
[Authorize(Policy = "Role:Write:Administrators")]
public void Delete(int id)

Parameters

id int

Get(int)

[HttpGet("{id}")]
[Authorize(Roles = "Registered Users")]
public Role Get(int id)

Parameters

id int

Returns

Role

Get(string, string)

[HttpGet]
[Authorize(Roles = "Registered Users")]
public IEnumerable<Role> Get(string siteid, string global)

Parameters

siteid string
global string

Returns

IEnumerable<Role>

Post(Role)

[HttpPost]
[Authorize(Policy = "Role:Write:Administrators")]
public Role Post(Role role)

Parameters

role Role

Returns

Role

Put(int, Role)

[HttpPut("{id}")]
[Authorize(Policy = "Role:Write:Administrators")]
public Role Put(int id, Role role)

Parameters

id int
role Role

Returns

Role