From 20bee25755503472771393ba3fcd499c46370fe8 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 8 Dec 2020 19:48:27 +0000 Subject: [PATCH] --- server/AyaNova/Controllers/UserController.cs | 54 ++++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/server/AyaNova/Controllers/UserController.cs b/server/AyaNova/Controllers/UserController.cs index dad24261..676fe490 100644 --- a/server/AyaNova/Controllers/UserController.cs +++ b/server/AyaNova/Controllers/UserController.cs @@ -248,36 +248,36 @@ namespace AyaNova.Api.Controllers - /// - /// Get list of Customer / Head office Users - /// (Rights to Customer object required) - /// - /// All "outside" Users (No staff or contractors) - [HttpGet("outlist")] - public async Task GetOutsideUserList() - { - if (!serverState.IsOpen) - return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason)); + // /// + // /// Get list of Customer / Head office Users + // /// (Rights to Customer object required) + // /// + // /// All "outside" Users (No staff or contractors) + // [HttpGet("outlist")] + // public async Task GetOutsideUserList() + // { + // if (!serverState.IsOpen) + // return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason)); - if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.Customer)) - return StatusCode(403, new ApiNotAuthorizedResponse()); + // if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.Customer)) + // return StatusCode(403, new ApiNotAuthorizedResponse()); - var ret = await ct.User.Include(c => c.Customer).Include(h => h.HeadOffice).Include(o => o.UserOptions).Where(z => z.UserType == UserType.Customer || z.UserType == UserType.HeadOffice).Select(z => new - { - Id = z.Id, - Active = z.Active, - Name = z.Name, - UserType = z.UserType, - LastLogin = z.LastLogin, - EmailAddress = z.UserOptions.EmailAddress, - Phone1 = z.UserOptions.Phone1, - Phone2 = z.UserOptions.Phone2, - Phone3 = z.UserOptions.Phone3, - Organization = z.HeadOffice.Name ?? z.Customer.Name + // var ret = await ct.User.Include(c => c.Customer).Include(h => h.HeadOffice).Include(o => o.UserOptions).Where(z => z.UserType == UserType.Customer || z.UserType == UserType.HeadOffice).Select(z => new + // { + // Id = z.Id, + // Active = z.Active, + // Name = z.Name, + // UserType = z.UserType, + // LastLogin = z.LastLogin, + // EmailAddress = z.UserOptions.EmailAddress, + // Phone1 = z.UserOptions.Phone1, + // Phone2 = z.UserOptions.Phone2, + // Phone3 = z.UserOptions.Phone3, + // Organization = z.HeadOffice.Name ?? z.Customer.Name - }).ToListAsync(); - return Ok(ApiOkResponse.Response(ret)); - } + // }).ToListAsync(); + // return Ok(ApiOkResponse.Response(ret)); + // } /// /// Get list of Customer Contact Users