Added group reminder

This commit is contained in:
Sarah Faey 2022-12-08 23:27:26 +01:00
parent 83f9b2d0b8
commit 64ce169094
12 changed files with 853 additions and 45 deletions

View file

@ -235,6 +235,16 @@ namespace Lieb.Data
.ToList();
}
public List<LiebRole> GetUserRoles(ulong userId)
{
using var context = _contextFactory.CreateDbContext();
return context.LiebRoles
.Include(u => u.RoleAssignments)
.ThenInclude(r => r.LiebUser)
.Where(r => r.RoleAssignments.Where(a => a.LiebUserId == userId).Any())
.ToList();
}
public async Task AddRole(LiebRole role)
{
using var context = _contextFactory.CreateDbContext();