Merge pull request #234 from Moonlight-Panel/FixDomainOwnerMatching
Fixed domain owner matching
This commit is contained in:
@@ -3,8 +3,10 @@
|
|||||||
@using Moonlight.App.Repositories.Domains
|
@using Moonlight.App.Repositories.Domains
|
||||||
@using Moonlight.App.Database.Entities
|
@using Moonlight.App.Database.Entities
|
||||||
@using Microsoft.EntityFrameworkCore
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
@using Moonlight.App.Services.Sessions
|
||||||
|
|
||||||
@inject DomainRepository DomainRepository
|
@inject DomainRepository DomainRepository
|
||||||
|
@inject IdentityService IdentityService
|
||||||
|
|
||||||
<LazyLoader Load="Load">
|
<LazyLoader Load="Load">
|
||||||
@if (Domains.Any())
|
@if (Domains.Any())
|
||||||
@@ -49,11 +51,8 @@
|
|||||||
}
|
}
|
||||||
</LazyLoader>
|
</LazyLoader>
|
||||||
|
|
||||||
@code {
|
@code
|
||||||
|
{
|
||||||
[CascadingParameter]
|
|
||||||
public User? User { get; set; }
|
|
||||||
|
|
||||||
private Domain[] Domains { get; set; }
|
private Domain[] Domains { get; set; }
|
||||||
|
|
||||||
private Task Load(LazyLoader loader)
|
private Task Load(LazyLoader loader)
|
||||||
@@ -62,7 +61,7 @@
|
|||||||
.Get()
|
.Get()
|
||||||
.Include(x => x.SharedDomain)
|
.Include(x => x.SharedDomain)
|
||||||
.Include(x => x.Owner)
|
.Include(x => x.Owner)
|
||||||
.Where(x => x.Owner == User)
|
.Where(x => x.Owner == IdentityService.User)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
|
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|||||||
Reference in New Issue
Block a user