Added group reminder
This commit is contained in:
parent
83f9b2d0b8
commit
64ce169094
12 changed files with 853 additions and 45 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue