mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 22:17:22 +01:00
include alias in checking for user in group
This commit is contained in:
parent
5341b5a409
commit
520a2299d0
1 changed files with 2 additions and 1 deletions
|
|
@ -111,7 +111,8 @@ public partial class MareHub
|
|||
{
|
||||
uid ??= AuthenticatedUserId;
|
||||
|
||||
var groupPair = await _dbContext.GroupPairs.Include(c => c.GroupUser).SingleOrDefaultAsync(g => g.GroupGID == gid && g.GroupUserUID == uid).ConfigureAwait(false);
|
||||
var groupPair = await _dbContext.GroupPairs.Include(c => c.GroupUser)
|
||||
.SingleOrDefaultAsync(g => g.GroupGID == gid && (g.GroupUserUID == uid || g.GroupUser.Alias == uid)).ConfigureAwait(false);
|
||||
if (groupPair == null) return (false, null);
|
||||
|
||||
return (true, groupPair);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue