Feature: Hall of Fame Module Implementation (1.0.1)

- Added Hall of Fame module logic (Models, Controller, Service).
- Implemented 'One Entry Per User' and 'Publish/Draft' workflow.
- Updated UI to Grid Layout (Index.razor) and Unified Form (Edit.razor).
- Added Database Migration 01000001 for new columns.
- Bumped version to 1.0.1.
This commit is contained in:
Adam Gaiswinkler
2026-01-15 00:01:55 +01:00
parent 5dfa690432
commit 7114904412
12 changed files with 378 additions and 55 deletions

View File

@@ -54,6 +54,20 @@ namespace SZUAbsolventenverein.Module.HallOfFame.Services
}
}
public Task<Models.HallOfFame> GetHallOfFameByUserIdAsync(int UserId, int ModuleId)
{
if (_userPermissions.IsAuthorized(_accessor.HttpContext.User, _alias.SiteId, EntityNames.Module, ModuleId, PermissionNames.View))
{
// Assuming Repository doesn't have specific method yet, using LINQ on GetHallOfFames
return Task.FromResult(_HallOfFameRepository.GetHallOfFames(ModuleId).FirstOrDefault(item => item.UserId == UserId));
}
else
{
_logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized HallOfFame GetByUserId Attempt {UserId} {ModuleId}", UserId, ModuleId);
return null;
}
}
public Task<Models.HallOfFame> AddHallOfFameAsync(Models.HallOfFame HallOfFame)
{
if (_userPermissions.IsAuthorized(_accessor.HttpContext.User, _alias.SiteId, EntityNames.Module, HallOfFame.ModuleId, PermissionNames.Edit))