This commit is contained in:
@@ -4,6 +4,8 @@ using System;
|
||||
using AyaNova.Util;
|
||||
using AyaNova.Api.ControllerHelpers;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using System.Linq;
|
||||
using AyaNova.Biz;
|
||||
|
||||
namespace AyaNova.Api.Controllers
|
||||
{
|
||||
@@ -132,6 +134,24 @@ namespace AyaNova.Api.Controllers
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get list of types and roles required
|
||||
/// </summary>
|
||||
/// <returns>A list of AyaType role rights</returns>
|
||||
[HttpGet("role-rights")]
|
||||
public ActionResult RoleRights()
|
||||
{
|
||||
return Ok(new
|
||||
{
|
||||
data = new
|
||||
{
|
||||
AyaTypes = BizRoles.roles.OrderBy(z => z.Key.ToString()).Select(z => new { AyaType = z.Key.ToString(), Change = z.Value.Change.ToString(), ReadFullRecord = z.Value.ReadFullRecord.ToString(), Select = z.Value.Select.ToString() }).ToList()
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
#if (DEBUG)
|
||||
/// <summary>
|
||||
/// Get build mode of server, used for automated testing purposes
|
||||
|
||||
Reference in New Issue
Block a user