Compare commits
15 Commits
208f1e04bf
...
f83b92ab63
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f83b92ab63 | ||
|
|
5b8b10f162 | ||
|
|
846751d1b4 | ||
|
|
d16097d1b1 | ||
|
|
3a0edfe956 | ||
|
|
2687837f2b | ||
|
|
cef098f265 | ||
|
|
66d6fa1f71 | ||
|
|
766e8d913d | ||
|
|
d76623155a | ||
|
|
3bcd723fba | ||
|
|
a21fcbf1d4 | ||
|
|
bce90dc00b | ||
|
|
8be6388a66 | ||
|
|
9b93869c15 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -144,3 +144,5 @@
|
|||||||
/DigitalData.UserManager.API/bin/Debug/net7.0/System.IdentityModel.Tokens.Jwt.dll
|
/DigitalData.UserManager.API/bin/Debug/net7.0/System.IdentityModel.Tokens.Jwt.dll
|
||||||
/DigitalData.UserManager.API/obj/DigitalData.UserManager.API.csproj.nuget.g.targets
|
/DigitalData.UserManager.API/obj/DigitalData.UserManager.API.csproj.nuget.g.targets
|
||||||
/DigitalData.UserManager.Infrastructure/obj/DigitalData.UserManager.Infrastructure.csproj.nuget.g.targets
|
/DigitalData.UserManager.Infrastructure/obj/DigitalData.UserManager.Infrastructure.csproj.nuget.g.targets
|
||||||
|
/DigitalData.UserManager.DTO/obj/
|
||||||
|
/DigitalData.UserManager.NgWebUI/ClientApp/.angular/cache/
|
||||||
|
|||||||
@@ -20,22 +20,37 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
private readonly IGroupOfUserService _gouService;
|
private readonly IGroupOfUserService _gouService;
|
||||||
private readonly IDirectorySearchService _dirSearchService;
|
private readonly IDirectorySearchService _dirSearchService;
|
||||||
private readonly IStringLocalizer<Resource> _localizer;
|
private readonly IStringLocalizer<Resource> _localizer;
|
||||||
|
private readonly ILogger<AuthController> _logger;
|
||||||
|
|
||||||
public AuthController(IUserService userService, IGroupOfUserService gouService, IDirectorySearchService directorySearchService, IStringLocalizer<Resource> localizer)
|
public AuthController(IUserService userService, IGroupOfUserService gouService, IDirectorySearchService directorySearchService, IStringLocalizer<Resource> localizer, ILogger<AuthController> logger)
|
||||||
{
|
{
|
||||||
_userService = userService;
|
_userService = userService;
|
||||||
_gouService = gouService;
|
_gouService = gouService;
|
||||||
_dirSearchService = directorySearchService;
|
_dirSearchService = directorySearchService;
|
||||||
_localizer = localizer;
|
_localizer = localizer;
|
||||||
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
[HttpGet("check")]
|
[HttpGet("check")]
|
||||||
public IActionResult CheckAuthentication() => Ok(new AuthCheckDto(IsAuthenticated: User.Identity?.IsAuthenticated ?? false));
|
public IActionResult CheckAuthentication()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return Ok(new AuthCheckDto(IsAuthenticated: User.Identity?.IsAuthenticated ?? false));
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
[HttpPost("login")]
|
[HttpPost("login")]
|
||||||
public async Task<IActionResult> Login([FromBody] LogInDto login)
|
public async Task<IActionResult> Login([FromBody] LogInDto login)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
bool isValid = _dirSearchService.ValidateCredentials(login.Username, login.Password);
|
bool isValid = _dirSearchService.ValidateCredentials(login.Username, login.Password);
|
||||||
|
|
||||||
@@ -58,12 +73,12 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
// Create claims
|
// Create claims
|
||||||
var claims = new List<Claim>
|
var claims = new List<Claim>
|
||||||
{
|
{
|
||||||
new Claim(ClaimTypes.NameIdentifier, user.Id.ToString()),
|
new (ClaimTypes.NameIdentifier, user.Id.ToString()),
|
||||||
new Claim(ClaimTypes.Name, user.Username),
|
new (ClaimTypes.Name, user.Username),
|
||||||
new Claim(ClaimTypes.Surname, user.Name ?? ""),
|
new (ClaimTypes.Surname, user.Name ?? ""),
|
||||||
new Claim(ClaimTypes.GivenName, user.Prename ?? ""),
|
new (ClaimTypes.GivenName, user.Prename ?? ""),
|
||||||
new Claim(ClaimTypes.Email, user.Email ?? ""),
|
new (ClaimTypes.Email, user.Email ?? ""),
|
||||||
new Claim(ClaimTypes.Role, "PM_USER")
|
new (ClaimTypes.Role, "PM_USER")
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create claimsIdentity
|
// Create claimsIdentity
|
||||||
@@ -87,10 +102,18 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
|
|
||||||
return Ok();
|
return Ok();
|
||||||
}
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Authorize]
|
[Authorize]
|
||||||
[HttpGet("user")]
|
[HttpGet("user")]
|
||||||
public async Task<IActionResult> GetUserWithClaims()
|
public async Task<IActionResult> GetUserWithClaims()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
// Extract the username from the Name claim.
|
// Extract the username from the Name claim.
|
||||||
string? username = User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Name)?.Value;
|
string? username = User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Name)?.Value;
|
||||||
@@ -98,22 +121,34 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
if (string.IsNullOrEmpty(username))
|
if (string.IsNullOrEmpty(username))
|
||||||
return Unauthorized();
|
return Unauthorized();
|
||||||
|
|
||||||
var userDto = await _userService.ReadByUsernameAsync(username);
|
return await _userService.ReadByUsernameAsync(username)
|
||||||
|
.ThenAsync(Ok, IActionResult (m, n) =>
|
||||||
if (!userDto.IsSuccess || userDto.Data is null)
|
|
||||||
{
|
{
|
||||||
|
_logger.LogNotice(n);
|
||||||
return NotFound(Result.Fail().Message(_localizer[Key.UserNotFound]));
|
return NotFound(Result.Fail().Message(_localizer[Key.UserNotFound]));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ok(userDto.Data);
|
[Authorize]
|
||||||
}
|
|
||||||
|
|
||||||
[AllowAnonymous]
|
|
||||||
[HttpPost("logout")]
|
[HttpPost("logout")]
|
||||||
public async Task<IActionResult> Logout()
|
public async Task<IActionResult> Logout()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||||
return Ok();
|
return Ok();
|
||||||
}
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -19,8 +19,9 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
private readonly IDirectorySearchService _dirSearchService;
|
private readonly IDirectorySearchService _dirSearchService;
|
||||||
private readonly Dictionary<string, string> _customSearchFilters;
|
private readonly Dictionary<string, string> _customSearchFilters;
|
||||||
private readonly IStringLocalizer<Resource> _localizer;
|
private readonly IStringLocalizer<Resource> _localizer;
|
||||||
|
private readonly ILogger<DirectoryController> _logger;
|
||||||
|
|
||||||
public DirectoryController(IConfiguration configuration, IStringLocalizer<Resource> localizer, IUserService userService, IDirectorySearchService directorySearchService)
|
public DirectoryController(IConfiguration configuration, IStringLocalizer<Resource> localizer, IUserService userService, IDirectorySearchService directorySearchService, ILogger<DirectoryController> logger)
|
||||||
{
|
{
|
||||||
_localizer = localizer;
|
_localizer = localizer;
|
||||||
_userService = userService;
|
_userService = userService;
|
||||||
@@ -28,10 +29,13 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
|
|
||||||
var customSearchFiltersSection = configuration.GetSection("DirectorySearch:CustomSearchFilters");
|
var customSearchFiltersSection = configuration.GetSection("DirectorySearch:CustomSearchFilters");
|
||||||
_customSearchFilters = customSearchFiltersSection.Get<Dictionary<string, string>>() ?? new();
|
_customSearchFilters = customSearchFiltersSection.Get<Dictionary<string, string>>() ?? new();
|
||||||
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("Root/{username}")]
|
[HttpGet("Root/{username}")]
|
||||||
public IActionResult GetRootOf(string username)
|
public IActionResult GetRootOf(string username)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var root = _dirSearchService.GetSearchRootCache(username);
|
var root = _dirSearchService.GetSearchRootCache(username);
|
||||||
|
|
||||||
@@ -46,9 +50,17 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
schemaClassName = root.SchemaClassName
|
schemaClassName = root.SchemaClassName
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet("CustomSearchFilter")]
|
[HttpGet("CustomSearchFilter")]
|
||||||
public IActionResult GetAllCustomFilters(string? filtername)
|
public IActionResult GetAllCustomFilters(string? filtername)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (filtername is null)
|
if (filtername is null)
|
||||||
{
|
{
|
||||||
@@ -60,9 +72,17 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
return filter is null ? NotFound() : Ok(filter);
|
return filter is null ? NotFound() : Ok(filter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[HttpPost("CreateSearchRoot")]
|
[HttpPost("CreateSearchRoot")]
|
||||||
public async Task<IActionResult> CreateSearchRoot([FromBody] SearchRootCreateDto searchRootCreateDto)
|
public async Task<IActionResult> CreateSearchRoot([FromBody] SearchRootCreateDto searchRootCreateDto)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var dirEntryUsername = searchRootCreateDto.DirEntryUsername ?? CurrentUser;
|
var dirEntryUsername = searchRootCreateDto.DirEntryUsername ?? CurrentUser;
|
||||||
if (dirEntryUsername is null)
|
if (dirEntryUsername is null)
|
||||||
@@ -80,9 +100,17 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
_dirSearchService.SetSearchRootCache(userResult.Data.Username, searchRootCreateDto.DirEntryPassword);
|
_dirSearchService.SetSearchRootCache(userResult.Data.Username, searchRootCreateDto.DirEntryPassword);
|
||||||
return Ok();
|
return Ok();
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet("SearchByFilter/{filter}")]
|
[HttpGet("SearchByFilter/{filter}")]
|
||||||
public IActionResult SearchByFilter([FromRoute] string filter, string? dirEntryUsername, params string[] propName)
|
public IActionResult SearchByFilter([FromRoute] string filter, string? dirEntryUsername, params string[] propName)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
dirEntryUsername ??= CurrentUser;
|
dirEntryUsername ??= CurrentUser;
|
||||||
|
|
||||||
@@ -92,9 +120,17 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
var result = _dirSearchService.FindAllByUserCache(dirEntryUsername, filter, properties: propName);
|
var result = _dirSearchService.FindAllByUserCache(dirEntryUsername, filter, properties: propName);
|
||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet("SearchByFilterName/{filterName}")]
|
[HttpGet("SearchByFilterName/{filterName}")]
|
||||||
public IActionResult SearchByFilterName([FromRoute] string filterName, string? dirEntryUsername, params string[] propName)
|
public IActionResult SearchByFilterName([FromRoute] string filterName, string? dirEntryUsername, params string[] propName)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
dirEntryUsername ??= CurrentUser;
|
dirEntryUsername ??= CurrentUser;
|
||||||
|
|
||||||
@@ -110,9 +146,17 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
|
|
||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet("Group")]
|
[HttpGet("Group")]
|
||||||
public IActionResult GetGroups(string? dirEntryUsername, params string[] propName)
|
public IActionResult GetGroups(string? dirEntryUsername, params string[] propName)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
dirEntryUsername ??= CurrentUser;
|
dirEntryUsername ??= CurrentUser;
|
||||||
|
|
||||||
@@ -128,9 +172,17 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
|
|
||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet("User")]
|
[HttpGet("User")]
|
||||||
public IActionResult GetUsersByGroupName(string? dirEntryUsername, [FromQuery] string? groupName = null)
|
public IActionResult GetUsersByGroupName(string? dirEntryUsername, [FromQuery] string? groupName = null)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
string[] propName = { "memberof", "samaccountname", "givenname", "sn", "mail" };
|
string[] propName = { "memberof", "samaccountname", "givenname", "sn", "mail" };
|
||||||
dirEntryUsername ??= CurrentUser;
|
dirEntryUsername ??= CurrentUser;
|
||||||
@@ -153,6 +205,12 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
|
|
||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private string? CurrentUser
|
private string? CurrentUser
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,14 +2,13 @@ using DigitalData.Core.API;
|
|||||||
using DigitalData.UserManager.Application.Contracts;
|
using DigitalData.UserManager.Application.Contracts;
|
||||||
using DigitalData.UserManager.Application.DTOs.Group;
|
using DigitalData.UserManager.Application.DTOs.Group;
|
||||||
using DigitalData.UserManager.Domain.Entities;
|
using DigitalData.UserManager.Domain.Entities;
|
||||||
using DigitalData.UserManager.Infrastructure.Contracts;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace DigitalData.UserManager.API.Controllers
|
namespace DigitalData.UserManager.API.Controllers
|
||||||
{
|
{
|
||||||
[Authorize]
|
[Authorize]
|
||||||
public class GroupController : CRUDControllerBase<IGroupService, GroupCreateDto, GroupReadDto, GroupUpdateDto, Group, int>
|
public class GroupController : CRUDControllerBaseWithErrorHandling<IGroupService, GroupCreateDto, GroupReadDto, GroupUpdateDto, Group, int>
|
||||||
{
|
{
|
||||||
public GroupController(ILogger<GroupController> logger, IGroupService service) : base(logger, service)
|
public GroupController(ILogger<GroupController> logger, IGroupService service) : base(logger, service)
|
||||||
{
|
{
|
||||||
@@ -17,6 +16,8 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
|
|
||||||
[HttpPost("ByDir")]
|
[HttpPost("ByDir")]
|
||||||
public async Task<IActionResult> CreateByDir(DirectoryGroupDto adGroup)
|
public async Task<IActionResult> CreateByDir(DirectoryGroupDto adGroup)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var result = await _service.CreateAsync(adGroup);
|
var result = await _service.CreateAsync(adGroup);
|
||||||
if (result.IsSuccess)
|
if (result.IsSuccess)
|
||||||
@@ -28,5 +29,11 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
}
|
}
|
||||||
return BadRequest(result);
|
return BadRequest(result);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,14 +2,13 @@ using DigitalData.Core.API;
|
|||||||
using DigitalData.UserManager.Application.Contracts;
|
using DigitalData.UserManager.Application.Contracts;
|
||||||
using DigitalData.UserManager.Application.DTOs.GroupOfUser;
|
using DigitalData.UserManager.Application.DTOs.GroupOfUser;
|
||||||
using DigitalData.UserManager.Domain.Entities;
|
using DigitalData.UserManager.Domain.Entities;
|
||||||
using DigitalData.UserManager.Infrastructure.Contracts;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace DigitalData.UserManager.API.Controllers
|
namespace DigitalData.UserManager.API.Controllers
|
||||||
{
|
{
|
||||||
[Authorize]
|
[Authorize]
|
||||||
public class GroupOfUserController : CRUDControllerBase<IGroupOfUserService, GroupOfUserCreateDto, GroupOfUserReadDto, GroupOfUserUpdateDto, GroupOfUser, int>
|
public class GroupOfUserController : CRUDControllerBaseWithErrorHandling<IGroupOfUserService, GroupOfUserCreateDto, GroupOfUserReadDto, GroupOfUserUpdateDto, GroupOfUser, int>
|
||||||
{
|
{
|
||||||
public GroupOfUserController(ILogger<GroupOfUserController> logger, IGroupOfUserService service) : base(logger, service)
|
public GroupOfUserController(ILogger<GroupOfUserController> logger, IGroupOfUserService service) : base(logger, service)
|
||||||
{
|
{
|
||||||
@@ -17,6 +16,8 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
|
|
||||||
[HttpDelete]
|
[HttpDelete]
|
||||||
public async Task<IActionResult> Delete([FromQuery] int groupId, [FromQuery] int userId)
|
public async Task<IActionResult> Delete([FromQuery] int groupId, [FromQuery] int userId)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var result = await _service.DeleteAsyncByGroupUserId(groupId, userId);
|
var result = await _service.DeleteAsyncByGroupUserId(groupId, userId);
|
||||||
if (result.IsSuccess)
|
if (result.IsSuccess)
|
||||||
@@ -26,12 +27,20 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
|
|
||||||
return BadRequest(result);
|
return BadRequest(result);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override Task<IActionResult> GetAll() => base.GetAll();
|
public override Task<IActionResult> GetAll() => base.GetAll();
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<IActionResult> GetAll([FromQuery]bool withUser = false, [FromQuery]bool withGroup = false)
|
public async Task<IActionResult> GetAll([FromQuery]bool withUser = false, [FromQuery]bool withGroup = false)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var result = await _service.ReadAllAsyncWith(withUser, withGroup);
|
var result = await _service.ReadAllAsyncWith(withUser, withGroup);
|
||||||
if (result.IsSuccess)
|
if (result.IsSuccess)
|
||||||
@@ -41,11 +50,25 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
|
|
||||||
return NotFound(result);
|
return NotFound(result);
|
||||||
}
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet("Has")]
|
[HttpGet("Has")]
|
||||||
public async Task<IActionResult> HasGroup([FromQuery] string username, [FromQuery] string groupname)
|
public async Task<IActionResult> HasGroup([FromQuery] string username, [FromQuery] string groupname)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
return Ok(await _service.HasGroup(username, groupname));
|
return Ok(await _service.HasGroup(username, groupname));
|
||||||
}
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,13 +2,12 @@ using DigitalData.Core.API;
|
|||||||
using DigitalData.UserManager.Application.Contracts;
|
using DigitalData.UserManager.Application.Contracts;
|
||||||
using DigitalData.UserManager.Application.DTOs.Module;
|
using DigitalData.UserManager.Application.DTOs.Module;
|
||||||
using DigitalData.UserManager.Domain.Entities;
|
using DigitalData.UserManager.Domain.Entities;
|
||||||
using DigitalData.UserManager.Infrastructure.Contracts;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
|
||||||
namespace DigitalData.UserManager.API.Controllers
|
namespace DigitalData.UserManager.API.Controllers
|
||||||
{
|
{
|
||||||
[Authorize]
|
[Authorize]
|
||||||
public class ModuleController : ReadControllerBase<IModuleService, ModuleDto, Module, int>
|
public class ModuleController : ReadControllerBaseWithErrorHandling<IModuleService, ModuleDto, Module, int>
|
||||||
{
|
{
|
||||||
public ModuleController(ILogger<ModuleController> logger, IModuleService service) : base(logger, service)
|
public ModuleController(ILogger<ModuleController> logger, IModuleService service) : base(logger, service)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Mvc;
|
|||||||
namespace DigitalData.UserManager.API.Controllers
|
namespace DigitalData.UserManager.API.Controllers
|
||||||
{
|
{
|
||||||
[Authorize]
|
[Authorize]
|
||||||
public class ModuleOfUserController : CRUDControllerBase<IModuleOfUserService, ModuleOfUserCreateDto, ModuleOfUserReadDto, ModuleOfUserUpdateDto, ModuleOfUser, int>
|
public class ModuleOfUserController : CRUDControllerBaseWithErrorHandling<IModuleOfUserService, ModuleOfUserCreateDto, ModuleOfUserReadDto, ModuleOfUserUpdateDto, ModuleOfUser, int>
|
||||||
{
|
{
|
||||||
public ModuleOfUserController(ILogger<ModuleOfUserController> logger, IModuleOfUserService service) : base(logger, service)
|
public ModuleOfUserController(ILogger<ModuleOfUserController> logger, IModuleOfUserService service) : base(logger, service)
|
||||||
{
|
{
|
||||||
@@ -16,6 +16,8 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
|
|
||||||
[HttpDelete]
|
[HttpDelete]
|
||||||
public async Task<IActionResult> Delete([FromQuery] int moduleId, [FromQuery]int userId)
|
public async Task<IActionResult> Delete([FromQuery] int moduleId, [FromQuery]int userId)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var result = await _service.DeleteAsyncByModuleUserId(moduleId, userId);
|
var result = await _service.DeleteAsyncByModuleUserId(moduleId, userId);
|
||||||
if (result.IsSuccess)
|
if (result.IsSuccess)
|
||||||
@@ -25,5 +27,11 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
|
|
||||||
return BadRequest(result);
|
return BadRequest(result);
|
||||||
}
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,15 +2,13 @@ using DigitalData.Core.API;
|
|||||||
using DigitalData.UserManager.Application.Contracts;
|
using DigitalData.UserManager.Application.Contracts;
|
||||||
using DigitalData.UserManager.Application.DTOs.User;
|
using DigitalData.UserManager.Application.DTOs.User;
|
||||||
using DigitalData.UserManager.Domain.Entities;
|
using DigitalData.UserManager.Domain.Entities;
|
||||||
using DigitalData.UserManager.Infrastructure.Contracts;
|
|
||||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace DigitalData.UserManager.API.Controllers
|
namespace DigitalData.UserManager.API.Controllers
|
||||||
{
|
{
|
||||||
[Authorize]
|
[Authorize]
|
||||||
public class UserController : CRUDControllerBase<IUserService, UserCreateDto, UserReadDto, UserUpdateDto, User, int>
|
public class UserController : CRUDControllerBaseWithErrorHandling<IUserService, UserCreateDto, UserReadDto, UserUpdateDto, User, int>
|
||||||
{
|
{
|
||||||
public UserController(ILogger<UserController> logger, IUserService service) : base(logger, service)
|
public UserController(ILogger<UserController> logger, IUserService service) : base(logger, service)
|
||||||
{
|
{
|
||||||
@@ -18,20 +16,38 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
|
|
||||||
[HttpGet("ByModuleId/{moduleId}")]
|
[HttpGet("ByModuleId/{moduleId}")]
|
||||||
public async Task<IActionResult> GetByModuleId([FromRoute] int moduleId, [FromQuery]bool assigned = true)
|
public async Task<IActionResult> GetByModuleId([FromRoute] int moduleId, [FromQuery]bool assigned = true)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var result = assigned ? await _service.ReadByModuleIdAsync(moduleId) : await _service.ReadUnassignedByModuleIdAsync(moduleId);
|
var result = assigned ? await _service.ReadByModuleIdAsync(moduleId) : await _service.ReadUnassignedByModuleIdAsync(moduleId);
|
||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet("ByGroupId/{groupId}")]
|
[HttpGet("ByGroupId/{groupId}")]
|
||||||
public async Task<IActionResult> GetByGroupId([FromRoute] int groupId, [FromQuery] bool assigned = true)
|
public async Task<IActionResult> GetByGroupId([FromRoute] int groupId, [FromQuery] bool assigned = true)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var result = assigned ? await _service.ReadByGroupIdAsync(groupId) : await _service.ReadUnassignedByGroupIdAsync(groupId); ;
|
var result = assigned ? await _service.ReadByGroupIdAsync(groupId) : await _service.ReadUnassignedByGroupIdAsync(groupId); ;
|
||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[HttpPost("ByDir")]
|
[HttpPost("ByDir")]
|
||||||
public async Task<IActionResult> CreateByDir(UserPrincipalDto upDto)
|
public async Task<IActionResult> CreateByDir(UserPrincipalDto upDto)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var result = await _service.CreateAsync(upDto);
|
var result = await _service.CreateAsync(upDto);
|
||||||
if (result.IsSuccess)
|
if (result.IsSuccess)
|
||||||
@@ -43,9 +59,17 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
}
|
}
|
||||||
return BadRequest(result);
|
return BadRequest(result);
|
||||||
}
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet("ByUsername/{username}")]
|
[HttpGet("ByUsername/{username}")]
|
||||||
public virtual async Task<IActionResult> GetByUsername([FromRoute] string username)
|
public virtual async Task<IActionResult> GetByUsername([FromRoute] string username)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var result = await _service.ReadByUsernameAsync(username);
|
var result = await _service.ReadByUsernameAsync(username);
|
||||||
if (result.IsSuccess)
|
if (result.IsSuccess)
|
||||||
@@ -54,5 +78,11 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
}
|
}
|
||||||
return NotFound(result);
|
return NotFound(result);
|
||||||
}
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
using DigitalData.UserManager.Application.Contracts;
|
using DigitalData.UserManager.Application.Contracts;
|
||||||
using DigitalData.UserManager.Application.DTOs.UserRep;
|
using DigitalData.UserManager.Application.DTOs.UserRep;
|
||||||
using DigitalData.UserManager.Domain.Entities;
|
using DigitalData.UserManager.Domain.Entities;
|
||||||
using DigitalData.UserManager.Infrastructure.Contracts;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Data.SqlClient;
|
using Microsoft.Data.SqlClient;
|
||||||
@@ -10,7 +9,7 @@ using Microsoft.Data.SqlClient;
|
|||||||
namespace DigitalData.UserManager.API.Controllers
|
namespace DigitalData.UserManager.API.Controllers
|
||||||
{
|
{
|
||||||
[Authorize]
|
[Authorize]
|
||||||
public class UserRepController : CRUDControllerBase<IUserRepService, UserRepCreateDto, UserRepReadDto, UserRepUpdateDto, UserRep, int>
|
public class UserRepController : CRUDControllerBaseWithErrorHandling<IUserRepService, UserRepCreateDto, UserRepReadDto, UserRepUpdateDto, UserRep, int>
|
||||||
{
|
{
|
||||||
public UserRepController(ILogger<UserRepController> logger, IUserRepService service) : base(logger, service)
|
public UserRepController(ILogger<UserRepController> logger, IUserRepService service) : base(logger, service)
|
||||||
{
|
{
|
||||||
@@ -24,6 +23,8 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<IActionResult> GetAll(bool withUser = false, bool withRepGroup = false, bool withRightGroup = false, bool withRepUser = false, int? userId = null)
|
public async Task<IActionResult> GetAll(bool withUser = false, bool withRepGroup = false, bool withRightGroup = false, bool withRepUser = false, int? userId = null)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var result = await _service.ReadAllAsync(withUser, withRepGroup, withRightGroup, withRepUser, userId);
|
var result = await _service.ReadAllAsync(withUser, withRepGroup, withRightGroup, withRepUser, userId);
|
||||||
|
|
||||||
@@ -34,20 +35,10 @@ namespace DigitalData.UserManager.API.Controllers
|
|||||||
|
|
||||||
return NotFound(result);
|
return NotFound(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async Task<IActionResult> Create(UserRepCreateDto createDto)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return await base.Create(createDto);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
var innerEx = ex.InnerException;
|
_logger.LogError(ex, "{Message}", ex.Message);
|
||||||
if (innerEx is SqlException)
|
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||||
return BadRequest(innerEx.Message);
|
|
||||||
else
|
|
||||||
return StatusCode(StatusCodes.Status500InternalServerError, ex.Message);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.0" />
|
<PackageReference Include="DigitalData.Core.API" Version="1.0.2.1" />
|
||||||
<PackageReference Include="DigitalData.Core.API" Version="1.0.0" />
|
|
||||||
<PackageReference Include="DigitalData.Core.Application" Version="1.0.0" />
|
|
||||||
<PackageReference Include="DigitalData.Core.DTO" Version="1.0.0" />
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.14" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.14" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.4" />
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.4" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
|
||||||
@@ -34,6 +31,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Folder Include="ClientApp\" />
|
||||||
<Folder Include="wwwroot\" />
|
<Folder Include="wwwroot\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.42000
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Reflection;
|
|
||||||
|
|
||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("DigitalData.UserManager.API")]
|
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("DigitalData.UserManager.API")]
|
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("DigitalData.UserManager.API")]
|
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
|
||||||
|
|
||||||
// Generated by the MSBuild WriteCodeFragment class.
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
4af23f4850bd99816ea88fa4ccf51033d1a51e9a
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
is_global = true
|
|
||||||
build_property.TargetFramework = net7.0
|
|
||||||
build_property.TargetPlatformMinVersion =
|
|
||||||
build_property.UsingMicrosoftNETSdkWeb = true
|
|
||||||
build_property.ProjectTypeGuids =
|
|
||||||
build_property.InvariantGlobalization =
|
|
||||||
build_property.PlatformNeutralAssembly =
|
|
||||||
build_property.EnforceExtendedAnalyzerRules =
|
|
||||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
|
||||||
build_property.RootNamespace = DigitalData.UserManager.API
|
|
||||||
build_property.RootNamespace = DigitalData.UserManager.API
|
|
||||||
build_property.ProjectDir = E:\TekH\Visual Studio\WebUserManager\DigitalData.UserManager.API\
|
|
||||||
build_property.RazorLangVersion = 7.0
|
|
||||||
build_property.SupportLocalizedComponentNames =
|
|
||||||
build_property.GenerateRazorMetadataSourceChecksumAttributes =
|
|
||||||
build_property.MSBuildProjectDirectory = E:\TekH\Visual Studio\WebUserManager\DigitalData.UserManager.API
|
|
||||||
build_property._RazorSourceGeneratorDebug =
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
using DigitalData.EmailProfilerDispatcher.Domain.Attributes;
|
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
|
||||||
|
|
||||||
namespace DigitalData.UserManager.Application.DTOs.User
|
namespace DigitalData.UserManager.Application.DTOs.User
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,10 +8,8 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
||||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.0" />
|
|
||||||
<PackageReference Include="DigitalData.Core.Application" Version="1.0.0" />
|
<PackageReference Include="DigitalData.Core.Application" Version="1.0.0" />
|
||||||
<PackageReference Include="DigitalData.Core.DTO" Version="1.0.0" />
|
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction" Version="1.0.0" />
|
||||||
<PackageReference Include="DigitalData.Core.Infrastructure" Version="1.0.0" />
|
|
||||||
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="7.0.16" />
|
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="7.0.16" />
|
||||||
<PackageReference Include="System.DirectoryServices" Version="7.0.1" />
|
<PackageReference Include="System.DirectoryServices" Version="7.0.1" />
|
||||||
<PackageReference Include="System.DirectoryServices.AccountManagement" Version="7.0.1" />
|
<PackageReference Include="System.DirectoryServices.AccountManagement" Version="7.0.1" />
|
||||||
@@ -23,22 +21,4 @@
|
|||||||
<ProjectReference Include="..\DigitalData.UserManager.Infrastructure\DigitalData.UserManager.Infrastructure.csproj" />
|
<ProjectReference Include="..\DigitalData.UserManager.Infrastructure\DigitalData.UserManager.Infrastructure.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="DigitalData.Core.Application">
|
|
||||||
<HintPath>..\..\WebCoreModules\DigitalData.Core.Application\bin\Debug\net7.0\DigitalData.Core.Application.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="DigitalData.Core.Contracts">
|
|
||||||
<HintPath>..\..\WebCoreModules\DigitalData.Core.Application\bin\Debug\net7.0\DigitalData.Core.Contracts.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="DigitalData.Core.DTO">
|
|
||||||
<HintPath>..\..\WebCoreModules\DigitalData.Core.Application\bin\Debug\net7.0\DigitalData.Core.DTO.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="DigitalData.Core.Infrastructure">
|
|
||||||
<HintPath>..\..\WebCoreModules\DigitalData.Core.Infrastructure\bin\Debug\net7.0\DigitalData.Core.Infrastructure.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="DigitalData.EmailProfilerDispatcher.Domain">
|
|
||||||
<HintPath>..\..\EmailProfilerDispatcher\DigitalData.EmailProfilerDispatcher.Domain\bin\Debug\net7.0\DigitalData.EmailProfilerDispatcher.Domain.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.42000
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Reflection;
|
|
||||||
|
|
||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("DigitalData.UserManager.Application")]
|
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("DigitalData.UserManager.Application")]
|
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("DigitalData.UserManager.Application")]
|
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
|
||||||
|
|
||||||
// Generated by the MSBuild WriteCodeFragment class.
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
726383d3dee8999efd00ff925990891b0cf878ae
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
is_global = true
|
|
||||||
build_property.TargetFramework = net7.0
|
|
||||||
build_property.TargetPlatformMinVersion =
|
|
||||||
build_property.UsingMicrosoftNETSdkWeb =
|
|
||||||
build_property.ProjectTypeGuids =
|
|
||||||
build_property.InvariantGlobalization =
|
|
||||||
build_property.PlatformNeutralAssembly =
|
|
||||||
build_property.EnforceExtendedAnalyzerRules =
|
|
||||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
|
||||||
build_property.RootNamespace = DigitalData.UserManager.Application
|
|
||||||
build_property.ProjectDir = E:\TekH\Visual Studio\WebUserManager\DigitalData.UserManager.Application\
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -1,7 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.DTO
|
|
||||||
{
|
|
||||||
public class Class1
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.Auth
|
|
||||||
{
|
|
||||||
public record AuthCheckDto (bool IsAuthenticated);
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.Auth
|
|
||||||
{
|
|
||||||
public record LogInDto(string Username, string Password);
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.Group
|
|
||||||
{
|
|
||||||
public record DirectoryGroupDto
|
|
||||||
(
|
|
||||||
IEnumerable<string> Samaccountname
|
|
||||||
//public string Name { get; set; }
|
|
||||||
//public string ObjectSid { get; set; }
|
|
||||||
//public string ObjectCategory { get; set; }
|
|
||||||
//public int SamAccountType { get; set; }
|
|
||||||
//public string DistinguishedName { get; set; }
|
|
||||||
//public int InstanceType { get; set; }
|
|
||||||
//public string CN { get; set; }
|
|
||||||
//public string ObjectClass { get; set; }
|
|
||||||
//public DateTime WhenChanged { get; set; }
|
|
||||||
//public Guid ObjectGuid { get; set; }
|
|
||||||
//public long UsnCreated { get; set; }
|
|
||||||
//public int? GroupType { get; set; }
|
|
||||||
//public DateTime? DsCorePropagationData { get; set; }
|
|
||||||
//public int? AdminCount { get; set; }
|
|
||||||
//public int? SystemFlags { get; set; }
|
|
||||||
//public string Member { get; set; }
|
|
||||||
//public string AdsPath { get; set; }
|
|
||||||
//public long UsnChanged { get; set; }
|
|
||||||
//public DateTime WhenCreated { get; set; }
|
|
||||||
//public string Description { get; set; }
|
|
||||||
//public bool? IsCriticalSystemObject { get; set; }
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.Group
|
|
||||||
{
|
|
||||||
public record GroupCreateDto
|
|
||||||
(
|
|
||||||
string? Name,
|
|
||||||
bool? AdSync,
|
|
||||||
bool? Internal,
|
|
||||||
bool? Active,
|
|
||||||
string? Comment,
|
|
||||||
string? AddedWho,
|
|
||||||
string? ChangedWho
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.Group
|
|
||||||
{
|
|
||||||
public record GroupReadDto
|
|
||||||
(
|
|
||||||
int Guid,
|
|
||||||
string? Name,
|
|
||||||
bool? AdSync,
|
|
||||||
bool? Internal,
|
|
||||||
bool? Active,
|
|
||||||
string? Comment,
|
|
||||||
string? AddedWho,
|
|
||||||
string? ChangedWho
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.Group
|
|
||||||
{
|
|
||||||
public record GroupUpdateDto
|
|
||||||
(
|
|
||||||
int Guid,
|
|
||||||
string? Name,
|
|
||||||
bool? AdSync,
|
|
||||||
bool? Internal,
|
|
||||||
bool? Active,
|
|
||||||
string? Comment,
|
|
||||||
string? ChangedWho
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.GroupOfUser
|
|
||||||
{
|
|
||||||
public record GroupOfUserCreateDto(
|
|
||||||
int UserId,
|
|
||||||
int GroupId,
|
|
||||||
string? Comment,
|
|
||||||
string? AddedWho
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
using DigitalData.UserManager.Application.DTOs.Group;
|
|
||||||
using DigitalData.UserManager.Application.DTOs.User;
|
|
||||||
|
|
||||||
namespace DigitalData.UserManager.Application.DTOs.GroupOfUser
|
|
||||||
{
|
|
||||||
public record GroupOfUserReadDto(
|
|
||||||
int Guid,
|
|
||||||
int UserId,
|
|
||||||
int GroupId,
|
|
||||||
string? Comment,
|
|
||||||
string AddedWho,
|
|
||||||
string? ChangedWho,
|
|
||||||
UserReadDto User,
|
|
||||||
GroupReadDto Group
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.GroupOfUser
|
|
||||||
{
|
|
||||||
public record GroupOfUserUpdateDto(
|
|
||||||
int Guid,
|
|
||||||
int? UserId,
|
|
||||||
int? GroupId,
|
|
||||||
string? Comment,
|
|
||||||
string? ChangedWho
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.Module
|
|
||||||
{
|
|
||||||
public record ModuleDto(
|
|
||||||
int Guid,
|
|
||||||
string? Name,
|
|
||||||
string? ShortName
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.ModuleOfUser
|
|
||||||
{
|
|
||||||
public record ModuleOfUserCreateDto(
|
|
||||||
int UserId,
|
|
||||||
int ModuleId,
|
|
||||||
bool IsAdmin,
|
|
||||||
string? Comment,
|
|
||||||
string? AddedWho
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.ModuleOfUser
|
|
||||||
{
|
|
||||||
public record ModuleOfUserReadDto(
|
|
||||||
int Guid,
|
|
||||||
int UserId,
|
|
||||||
int ModuleId,
|
|
||||||
string? Comment,
|
|
||||||
string? AddedWho,
|
|
||||||
string? ChangedWho
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.ModuleOfUser
|
|
||||||
{
|
|
||||||
public record ModuleOfUserUpdateDto(
|
|
||||||
int Guid,
|
|
||||||
int UserId,
|
|
||||||
int ModuleId,
|
|
||||||
bool? IsAdmin,
|
|
||||||
string? Comment,
|
|
||||||
string? ChangedWho
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs
|
|
||||||
{
|
|
||||||
public record SearchRootCreateDto(string? DirEntryUsername, string DirEntryPassword);
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.User
|
|
||||||
{
|
|
||||||
public record class UserCreateDto
|
|
||||||
{
|
|
||||||
public string? Prename { get; init; }
|
|
||||||
public string? Name { get; init; }
|
|
||||||
public string? Username { get; init; }
|
|
||||||
public string? Shortname { get; init; }
|
|
||||||
public string? Email { get; init; }
|
|
||||||
public string Language { get; init; } = "de-DE";
|
|
||||||
public string? Comment { get; init; }
|
|
||||||
public bool? Deleted { get; init; }
|
|
||||||
public string DateFormat { get; init; } = "dd.MM.yyyy";
|
|
||||||
public string AddedWho { get; init; } = "DEFAULT";
|
|
||||||
public string? ChangedWho { get; init; }
|
|
||||||
public bool Active { get; init; } = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.User
|
|
||||||
{
|
|
||||||
public record UserPrincipalDto
|
|
||||||
(
|
|
||||||
string SamAccountName,
|
|
||||||
string GivenName,
|
|
||||||
string? MiddleName,
|
|
||||||
string Surname,
|
|
||||||
string EmailAddress,
|
|
||||||
string? AddedWho,
|
|
||||||
string? DateFormat
|
|
||||||
// Guid Guid,
|
|
||||||
// string SId,
|
|
||||||
// string EmployeeId,
|
|
||||||
// string VoiceTelephoneNumber,
|
|
||||||
// DateTime? AccountExpirationDate,
|
|
||||||
// DateTime? AccountLockoutTime,
|
|
||||||
// bool AllowReversiblePasswordEncryption,
|
|
||||||
// int BadLogonCount,
|
|
||||||
// bool DelegationPermitted,
|
|
||||||
// bool? Enabled,
|
|
||||||
// string HomeDirectory,
|
|
||||||
// string HomeDrive,
|
|
||||||
// DateTime? LastBadPasswordAttempt,
|
|
||||||
// DateTime? LastLogon,
|
|
||||||
// DateTime? LastPasswordSet,
|
|
||||||
// bool PasswordNeverExpires,
|
|
||||||
// bool PasswordNotRequired,
|
|
||||||
// byte[] PermittedLogonTimes,
|
|
||||||
// bool SmartcardLogonRequired,
|
|
||||||
// bool UserCannotChangePassword
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.User
|
|
||||||
{
|
|
||||||
public record UserPrincipalReadDto
|
|
||||||
(
|
|
||||||
Guid Guid,
|
|
||||||
string SId,
|
|
||||||
string EmployeeId,
|
|
||||||
string SamAccountName,
|
|
||||||
string GivenName,
|
|
||||||
string MiddleName,
|
|
||||||
string Surname,
|
|
||||||
string EmailAddress
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.User
|
|
||||||
{
|
|
||||||
public record UserReadDto(
|
|
||||||
int Guid,
|
|
||||||
string? Prename,
|
|
||||||
string? Name,
|
|
||||||
string Username,
|
|
||||||
string? Shortname,
|
|
||||||
string? Email,
|
|
||||||
string Language,
|
|
||||||
string? Comment,
|
|
||||||
bool Deleted,
|
|
||||||
string DateFormat,
|
|
||||||
string AddedWho,
|
|
||||||
bool Active
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.User
|
|
||||||
{
|
|
||||||
public record UserUpdateDto(
|
|
||||||
int Guid,
|
|
||||||
string? Prename,
|
|
||||||
string? Name,
|
|
||||||
string? Username,
|
|
||||||
string? Shortname,
|
|
||||||
string? Email,
|
|
||||||
string? Language,
|
|
||||||
string? Comment,
|
|
||||||
bool? Deleted,
|
|
||||||
string? DateFormat,
|
|
||||||
string? AddedWho,
|
|
||||||
string? ChangedWho,
|
|
||||||
bool? Active
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.UserRep
|
|
||||||
{
|
|
||||||
public record UserRepCreateDto(
|
|
||||||
int UserId,
|
|
||||||
int? RepGroupId,
|
|
||||||
int RightGroupId,
|
|
||||||
string AddedWho,
|
|
||||||
int RepUserId
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
using DigitalData.UserManager.Application.DTOs.Group;
|
|
||||||
using DigitalData.UserManager.Application.DTOs.User;
|
|
||||||
|
|
||||||
namespace DigitalData.UserManager.Application.DTOs.UserRep
|
|
||||||
{
|
|
||||||
public record UserRepReadDto(
|
|
||||||
int Guid,
|
|
||||||
int UserId,
|
|
||||||
int? RepGroupId,
|
|
||||||
int RightGroupId,
|
|
||||||
string AddedWho,
|
|
||||||
int? RepUserId,
|
|
||||||
UserReadDto? User,
|
|
||||||
GroupReadDto? RepGroup,
|
|
||||||
GroupReadDto? RightGroup,
|
|
||||||
UserReadDto? RepUser
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
namespace DigitalData.UserManager.Application.DTOs.UserRep
|
|
||||||
{
|
|
||||||
public record UserRepUpdateDto(
|
|
||||||
int UserId,
|
|
||||||
int? RepGroupId,
|
|
||||||
int RightGroupId,
|
|
||||||
int RepUserId
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
using AutoMapper;
|
|
||||||
using DigitalData.UserManager.Application.DTOs.User;
|
|
||||||
namespace DigitalData.UserManager.Application.MappingProfiles
|
|
||||||
{
|
|
||||||
public class DirectoryMappingProfile : Profile
|
|
||||||
{
|
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>")]
|
|
||||||
public DirectoryMappingProfile()
|
|
||||||
{
|
|
||||||
//CreateMap<UserPrincipal, UserPrincipalDto>();
|
|
||||||
//CreateMap<UserPrincipal, UserPrincipalReadDto>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
using AutoMapper;
|
|
||||||
using DigitalData.UserManager.Application.DTOs.Group;
|
|
||||||
using DigitalData.UserManager.Domain.Entities;
|
|
||||||
|
|
||||||
namespace DigitalData.UserManager.Application.MappingProfiles
|
|
||||||
{
|
|
||||||
public class GroupMappingProfile : Profile
|
|
||||||
{
|
|
||||||
public GroupMappingProfile()
|
|
||||||
{
|
|
||||||
CreateMap<Group, GroupCreateDto>();
|
|
||||||
CreateMap<Group, GroupReadDto>();
|
|
||||||
CreateMap<Group, GroupUpdateDto>();
|
|
||||||
|
|
||||||
CreateMap<GroupCreateDto, Group>();
|
|
||||||
CreateMap<GroupReadDto, Group>();
|
|
||||||
CreateMap<GroupUpdateDto, Group>();
|
|
||||||
|
|
||||||
CreateMap<DirectoryGroupDto, Group>()
|
|
||||||
.ForMember(group => group.EcmFkId, opt => opt.MapFrom(adGroup => 1))
|
|
||||||
.ForMember(group => group.AdSync, opt => opt.MapFrom(adGroup => true))
|
|
||||||
.ForMember(group => group.Internal, opt => opt.MapFrom(adGroup => false))
|
|
||||||
.ForMember(group => group.Active, opt => opt.MapFrom(adGroup => true))
|
|
||||||
.ForMember(group => group.Name, opt => opt.MapFrom(adGroup => adGroup.Samaccountname.ElementAt(0)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
using AutoMapper;
|
|
||||||
using DigitalData.UserManager.Application.DTOs.GroupOfUser;
|
|
||||||
using DigitalData.UserManager.Domain.Entities;
|
|
||||||
|
|
||||||
namespace DigitalData.UserManager.Application.MappingProfiles
|
|
||||||
{
|
|
||||||
public class GroupOfUserMappingProfile : Profile
|
|
||||||
{
|
|
||||||
public GroupOfUserMappingProfile()
|
|
||||||
{
|
|
||||||
CreateMap<GroupOfUser, GroupOfUserCreateDto>();
|
|
||||||
CreateMap<GroupOfUser, GroupOfUserReadDto>();
|
|
||||||
CreateMap<GroupOfUser, GroupOfUserUpdateDto>();
|
|
||||||
|
|
||||||
CreateMap<GroupOfUserCreateDto, GroupOfUser>();
|
|
||||||
CreateMap<GroupOfUserReadDto, GroupOfUser>();
|
|
||||||
CreateMap<GroupOfUserUpdateDto, GroupOfUser>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
using AutoMapper;
|
|
||||||
using DigitalData.UserManager.Application.DTOs.Module;
|
|
||||||
using DigitalData.UserManager.Domain.Entities;
|
|
||||||
|
|
||||||
namespace DigitalData.UserManager.Application.MappingProfiles
|
|
||||||
{
|
|
||||||
public class ModuleMappingProfile : Profile
|
|
||||||
{
|
|
||||||
public ModuleMappingProfile()
|
|
||||||
{
|
|
||||||
CreateMap<Module, ModuleDto>();
|
|
||||||
CreateMap<Module, ModuleDto>();
|
|
||||||
CreateMap<Module, ModuleDto>();
|
|
||||||
|
|
||||||
CreateMap<ModuleDto, Module>();
|
|
||||||
CreateMap<ModuleDto, Module>();
|
|
||||||
CreateMap<ModuleDto, Module>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
using AutoMapper;
|
|
||||||
using DigitalData.UserManager.Application.DTOs.ModuleOfUser;
|
|
||||||
using DigitalData.UserManager.Domain.Entities;
|
|
||||||
|
|
||||||
namespace DigitalData.UserManager.Application.MappingProfiles
|
|
||||||
{
|
|
||||||
public class ModuleOfUserMappingProfile : Profile
|
|
||||||
{
|
|
||||||
public ModuleOfUserMappingProfile()
|
|
||||||
{
|
|
||||||
CreateMap<ModuleOfUser, ModuleOfUserCreateDto>();
|
|
||||||
CreateMap<ModuleOfUser, ModuleOfUserReadDto>();
|
|
||||||
CreateMap<ModuleOfUser, ModuleOfUserUpdateDto>();
|
|
||||||
|
|
||||||
CreateMap<ModuleOfUserCreateDto, ModuleOfUser>();
|
|
||||||
CreateMap<ModuleOfUserReadDto, ModuleOfUser>();
|
|
||||||
CreateMap<ModuleOfUserUpdateDto, ModuleOfUser>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
using AutoMapper;
|
|
||||||
using DigitalData.UserManager.Application.DTOs.User;
|
|
||||||
using DigitalData.UserManager.Domain.Entities;
|
|
||||||
|
|
||||||
namespace DigitalData.UserManager.Application.MappingProfiles
|
|
||||||
{
|
|
||||||
public class UserMappingProfile : Profile
|
|
||||||
{
|
|
||||||
public UserMappingProfile()
|
|
||||||
{
|
|
||||||
CreateMap<User, UserCreateDto>();
|
|
||||||
CreateMap<User, UserReadDto>();
|
|
||||||
CreateMap<User, UserUpdateDto>();
|
|
||||||
|
|
||||||
CreateMap<UserCreateDto, User>();
|
|
||||||
CreateMap<UserReadDto, User>();
|
|
||||||
CreateMap<UserUpdateDto, User>();
|
|
||||||
|
|
||||||
CreateMap<UserPrincipalDto, User>()
|
|
||||||
.ForMember(user => user.Name, opt => opt.MapFrom(upDto => upDto.Surname))
|
|
||||||
.ForMember(user => user.Prename, opt => opt.MapFrom(upDto => upDto.GivenName))
|
|
||||||
.ForMember(user => user.Username, opt => opt.MapFrom(upDto => upDto.SamAccountName))
|
|
||||||
.ForMember(user => user.Email, opt => opt.MapFrom(upDto => upDto.EmailAddress));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
using AutoMapper;
|
|
||||||
using DigitalData.UserManager.Application.DTOs.UserRep;
|
|
||||||
using DigitalData.UserManager.Domain.Entities;
|
|
||||||
|
|
||||||
namespace DigitalData.UserManager.Application.MappingProfiles
|
|
||||||
{
|
|
||||||
public class UserRepMappingProfile : Profile
|
|
||||||
{
|
|
||||||
public UserRepMappingProfile()
|
|
||||||
{
|
|
||||||
CreateMap<UserRep, UserRepCreateDto>();
|
|
||||||
CreateMap<UserRep, UserRepReadDto>();
|
|
||||||
CreateMap<UserRep, UserRepUpdateDto>();
|
|
||||||
|
|
||||||
CreateMap<UserRepCreateDto, UserRep>();
|
|
||||||
CreateMap<UserRepReadDto, UserRep>();
|
|
||||||
CreateMap<UserRepUpdateDto, UserRep>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.42000
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Reflection;
|
|
||||||
|
|
||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("DigitalData.UserManager.Domain")]
|
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("DigitalData.UserManager.Domain")]
|
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("DigitalData.UserManager.Domain")]
|
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
|
||||||
|
|
||||||
// Generated by the MSBuild WriteCodeFragment class.
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
fcc50fa7ab4668cf3dfb07d56b7f096248f228dc
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
is_global = true
|
|
||||||
build_property.TargetFramework = net7.0
|
|
||||||
build_property.TargetPlatformMinVersion =
|
|
||||||
build_property.UsingMicrosoftNETSdkWeb =
|
|
||||||
build_property.ProjectTypeGuids =
|
|
||||||
build_property.InvariantGlobalization =
|
|
||||||
build_property.PlatformNeutralAssembly =
|
|
||||||
build_property.EnforceExtendedAnalyzerRules =
|
|
||||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
|
||||||
build_property.RootNamespace = DigitalData.UserManager.Domain
|
|
||||||
build_property.ProjectDir = E:\TekH\Visual Studio\WebUserManager\DigitalData.UserManager.Domain\
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -7,8 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.0" />
|
<PackageReference Include="DigitalData.Core.Infrastructure" Version="1.0.1.1" />
|
||||||
<PackageReference Include="DigitalData.Core.Infrastructure" Version="1.0.0" />
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.15">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.15">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.42000
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Reflection;
|
|
||||||
|
|
||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("DigitalData.UserManager.Infrastructure")]
|
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("DigitalData.UserManager.Infrastructure")]
|
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("DigitalData.UserManager.Infrastructure")]
|
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
|
||||||
|
|
||||||
// Generated by the MSBuild WriteCodeFragment class.
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
6ecec595dcbad33e85f74049b526e6c83f86b0af
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
is_global = true
|
|
||||||
build_property.TargetFramework = net7.0
|
|
||||||
build_property.TargetPlatformMinVersion =
|
|
||||||
build_property.UsingMicrosoftNETSdkWeb =
|
|
||||||
build_property.ProjectTypeGuids =
|
|
||||||
build_property.InvariantGlobalization =
|
|
||||||
build_property.PlatformNeutralAssembly =
|
|
||||||
build_property.EnforceExtendedAnalyzerRules =
|
|
||||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
|
||||||
build_property.RootNamespace = DigitalData.UserManager.Infrastructure
|
|
||||||
build_property.ProjectDir = E:\TekH\Visual Studio\WebUserManager\DigitalData.UserManager.Infrastructure\
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -80,7 +80,7 @@
|
|||||||
"buildTarget": "DigitalData.UserManager.NgWebUI:build:production"
|
"buildTarget": "DigitalData.UserManager.NgWebUI:build:production"
|
||||||
},
|
},
|
||||||
"development": {
|
"development": {
|
||||||
"proxyConfig": "proxy.conf.js",
|
"proxyConfig": "proxy.conf.json",
|
||||||
"buildTarget": "DigitalData.UserManager.NgWebUI:build:development"
|
"buildTarget": "DigitalData.UserManager.NgWebUI:build:development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
const { env } = require('process');
|
|
||||||
|
|
||||||
const target = env.ASPNETCORE_HTTPS_PORT ? `https://localhost:${env.ASPNETCORE_HTTPS_PORT}` :
|
|
||||||
env.ASPNETCORE_URLS ? env.ASPNETCORE_URLS.split(';')[0] : 'http://localhost:62037';
|
|
||||||
|
|
||||||
const PROXY_CONFIG = [
|
|
||||||
{
|
|
||||||
context: [
|
|
||||||
"/weatherforecast",
|
|
||||||
],
|
|
||||||
target: target,
|
|
||||||
secure: false,
|
|
||||||
headers: {
|
|
||||||
Connection: 'Keep-Alive'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
module.exports = PROXY_CONFIG;
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"/api": {
|
||||||
|
"target": "https://localhost:7202",
|
||||||
|
"secure": false,
|
||||||
|
"changeOrigin": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>User Manager Portal</title>
|
<title>User Manager Portal</title>
|
||||||
<base href="/" />
|
<base href="/" />
|
||||||
<user-manager-api href="https://localhost:7202/api/" user-route="user" group-route="group" module-route="module"
|
<user-manager-api href="/api/" user-route="user" group-route="group" module-route="module"
|
||||||
module-of-user-route="moduleOfUser" group-of-user-route="groupOfUser" user-representation-route="userRep"
|
module-of-user-route="moduleOfUser" group-of-user-route="groupOfUser" user-representation-route="userRep"
|
||||||
dir-group-route="directory/Group?propName=samaccountname" dir-user-route="directory/user" dir-route="directory"
|
dir-group-route="directory/Group?propName=samaccountname" dir-user-route="directory/user" dir-route="directory"
|
||||||
login-route="auth/login" , logout-route="auth/logout" , login-check-route="auth/check" />
|
login-route="auth/login" , logout-route="auth/logout" , login-check-route="auth/check" />
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ Global
|
|||||||
{0634853C-C515-48AF-8E27-E5CBF592BCE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{0634853C-C515-48AF-8E27-E5CBF592BCE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{0634853C-C515-48AF-8E27-E5CBF592BCE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{0634853C-C515-48AF-8E27-E5CBF592BCE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{0634853C-C515-48AF-8E27-E5CBF592BCE7}.Release|Any CPU.Build.0 = Release|Any CPU
|
{0634853C-C515-48AF-8E27-E5CBF592BCE7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{BFBD26C1-2E95-41EC-A5CC-F334CB2309A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{BFBD26C1-2E95-41EC-A5CC-F334CB2309A8}.Debug|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{BFBD26C1-2E95-41EC-A5CC-F334CB2309A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{BFBD26C1-2E95-41EC-A5CC-F334CB2309A8}.Debug|Any CPU.Build.0 = Release|Any CPU
|
||||||
{BFBD26C1-2E95-41EC-A5CC-F334CB2309A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{BFBD26C1-2E95-41EC-A5CC-F334CB2309A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{BFBD26C1-2E95-41EC-A5CC-F334CB2309A8}.Release|Any CPU.Build.0 = Release|Any CPU
|
{BFBD26C1-2E95-41EC-A5CC-F334CB2309A8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{1DD81373-82F9-4872-95C6-888624DB1797}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{1DD81373-82F9-4872-95C6-888624DB1797}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
|||||||
Reference in New Issue
Block a user