Remove role management from AuthHex; update documentation and user handling to reflect ERP ownership of roles.
CI/CD - erp auth / Build & Deploy (pull_request) Failing after 15m9s

This commit is contained in:
Dhananjaya99
2026-10-18 12:45:58 +05:30
parent 703d21d56c
commit fbd079d337
14 changed files with 12 additions and 350 deletions
-43
View File
@@ -1,43 +0,0 @@
using AuthHex.Interfaces;
using AuthHex.Models;
using Microsoft.EntityFrameworkCore;
namespace AuthHex.Repos
{
public class RoleManageRepository : IRoleManageRepository
{
private readonly AppDBContext _dbContext;
public RoleManageRepository(AppDBContext dbContext)
{
_dbContext = dbContext;
}
public Task<Role> AddRoleAsync(Role role, CancellationToken ct = default)
{
_dbContext.Roles.Add(role);
return Task.FromResult(role);
}
public async Task<Role?> GetRoleByIdAsync(Guid roleId, CancellationToken ct = default)
{
return await _dbContext.Roles.FirstOrDefaultAsync(r => r.RoleId == roleId, ct);
}
public async Task<List<Role>> ListRolesAsync(CancellationToken ct = default)
{
return await _dbContext.Roles.OrderBy(r => r.Code).ToListAsync(ct);
}
public async Task<bool> RoleInUseAsync(Guid roleId, CancellationToken ct = default)
{
return await _dbContext.Users.AnyAsync(u => u.RoleId == roleId, ct);
}
public Task DeleteRoleAsync(Role role, CancellationToken ct = default)
{
_dbContext.Roles.Remove(role);
return Task.CompletedTask;
}
}
}
-1
View File
@@ -70,7 +70,6 @@ namespace AuthHex.Repos
public async Task<User?> GetUserByIdAsync(Guid userId, CancellationToken ct = default)
{
return await _dbContext.Users
.Include(u => u.Role)
.Include(u => u.UserType)
.FirstOrDefaultAsync(u => u.Id == userId, ct);
}