This commit is contained in:
2020-01-03 18:42:43 +00:00
parent 8a844435f4
commit aabbc79516
7 changed files with 40 additions and 11 deletions

View File

@@ -19,7 +19,7 @@ namespace AyaNova.Api.Controllers
[ApiVersion("8.0")]
[Route("api/v{version:apiVersion}/[controller]")]
[Produces("application/json")]
[Authorize]
[Authorize]
public class AyaEnumPickListController : ControllerBase
{
private readonly AyContext ct;
@@ -101,7 +101,9 @@ namespace AyaNova.Api.Controllers
LocaleKeysToFetch.Add("AuthorizationRoleClientFull");
LocaleKeysToFetch.Add("AuthorizationRoleOpsAdminLimited");
LocaleKeysToFetch.Add("AuthorizationRoleOpsAdminFull");
LocaleKeysToFetch.Add("AuthorizationRoleAll");
LocaleKeysToFetch.Add("AuthorizationRoleSalesLimited");
LocaleKeysToFetch.Add("AuthorizationRoleSalesFull");
LocaleKeysToFetch.Add("AuthorizationRoleAll");
var LT = LocaleBiz.GetSubsetStatic(LocaleKeysToFetch, LocaleId).Result;
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleNoRole"], Id = (long)AuthorizationRoles.NoRole });
@@ -120,6 +122,8 @@ namespace AyaNova.Api.Controllers
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleClientFull"], Id = (long)AuthorizationRoles.ClientFull });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleOpsAdminLimited"], Id = (long)AuthorizationRoles.OpsAdminLimited });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleOpsAdminFull"], Id = (long)AuthorizationRoles.OpsAdminFull });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleSalesLimited"], Id = (long)AuthorizationRoles.SalesLimited });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleSalesFull"], Id = (long)AuthorizationRoles.SalesFull });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleAll"], Id = (long)AuthorizationRoles.All });
}
@@ -152,7 +156,7 @@ namespace AyaNova.Api.Controllers
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
}
List<KeyValuePair<string, string>> ret = new List<KeyValuePair<string, string>>();
List<KeyValuePair<string, string>> ret = new List<KeyValuePair<string, string>>();
ret.Add(new KeyValuePair<string, string>("usertypes", "AyaNova user account types"));
ret.Add(new KeyValuePair<string, string>("authorizationroles", "AyaNova user account role types"));
ret.Add(new KeyValuePair<string, string>("AyaType", "All AyaNova object types, use the AyaTypeController route to fetch these"));