=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===

This commit is contained in:
julian
2026-06-28 02:50:05 -07:00
parent a19fb90902
commit 586f02a2ca
654 changed files with 5260 additions and 0 deletions
@@ -25,6 +25,7 @@ public class AuthorityService(
/// </summary>
/// <param name="roleName">The name of the role to associate with the authority.</param>
/// <param name="userId">The unique identifier of the user for whom the authority is being created.</param>
/// <!-- aidoc:v1 sig=e8925cb body=6481017 -->
public void CreateNew(string roleName, ObjectId userId)
{
authorityRepository.CreateNewAuthority(roleName, userId);
@@ -34,6 +35,7 @@ public class AuthorityService(
/// Inserts a new <paramref name="authorization"/> into the authority repository and records an audit log entry for the operation using the current HTTP context user.
/// </summary>
/// <param name="authorization">The authorization entity to be inserted and tracked in the audit log.</param>
/// <!-- aidoc:v1 sig=ae025de body=a51a17b -->
public async Task InsertOne(Authorization authorization)
{
await authorityRepository.InsertOneAsync(authorization);
@@ -44,6 +46,7 @@ public class AuthorityService(
/// Updates an existing authorization record in the repository and records an audit log entry capturing the previous and updated states for the current user.
/// </summary>
/// <param name="authorization">The authorization entity containing the identifier of the record to update and its new values.</param>
/// <!-- aidoc:v1 sig=0061b8f body=ec8308f -->
public async Task updateOne(Authorization authorization)
{
var oldAuth = await authorityRepository.GetById(authorization.Id);
@@ -56,6 +59,7 @@ public class AuthorityService(
/// </summary>
/// <param name="userId"></param>
/// <returns>A list of the user's authorities.</returns>
/// <!-- aidoc:v1 sig=f9a2a8a body=7e449b3 -->
public Task<List<Authorization>> GetUserAuthorities(ObjectId userId)
{
return authorityRepository.GetUserAuthorities(userId);
@@ -65,6 +69,7 @@ public class AuthorityService(
/// Retrieves all available authorities from the underlying repository.
/// </summary>
/// <returns>A task that represents the asynchronous operation, containing a list of all <see cref="Authorization"/> records.</returns>
/// <!-- aidoc:v1 sig=db31dc4 body=3106354 -->
public Task<List<Authorization>> GetAllAuthorities()
{
return authorityRepository.GetAllAuthorities();
@@ -75,6 +80,7 @@ public class AuthorityService(
/// </summary>
/// <param name="id">The unique identifier of the user whose authorities should be deleted.</param>
/// <returns><c>true</c> if the authorities were successfully deleted; otherwise, <c>false</c>.</returns>
/// <!-- aidoc:v1 sig=abc4727 body=4c48116 -->
public async Task<bool> DeleteAuthoritiesForUser(ObjectId id)
{
try
@@ -99,6 +105,7 @@ public class AuthorityService(
/// </summary>
/// <param name="authorization">The authorization entity to be created and stored.</param>
/// <returns>The created <see cref="Authorization"/> entity.</returns>
/// <!-- aidoc:v1 sig=dd7f92d body=801be1a -->
public async Task<Authorization?> CreateNewUserAuthority(Authorization authorization)
{
await authorityRepository.InsertOneAsync(authorization);
@@ -112,6 +119,7 @@ public class AuthorityService(
/// </summary>
/// <param name="userAuthorityIdParsed">The parsed identifier of the user authority to delete.</param>
/// <returns><c>true</c> if the user authority was successfully deleted; otherwise, <c>false</c>.</returns>
/// <!-- aidoc:v1 sig=73f08c6 body=0b2f9a8 -->
public async Task<bool> DeleteUserAuthority(ObjectId userAuthorityIdParsed)
{
try
@@ -135,6 +143,7 @@ public class AuthorityService(
/// </summary>
/// <param name="authorization">The authorization entity containing the updated information to persist.</param>
/// <returns>The updated <see cref="Authorization"/> on success, or <c>null</c> if an error occurs during the operation.</returns>
/// <!-- aidoc:v1 sig=21fd169 body=9a8dcf9 -->
public async Task<Authorization?> EditUserAuthority(Authorization authorization)
{
try