Merge pull request #237 from Moonlight-Panel/FixDomainIdentityIssues
Fixed domain identity issues
This commit is contained in:
@@ -90,6 +90,7 @@
|
|||||||
<Folder Include="App\ApiClients\CloudPanel\Resources\" />
|
<Folder Include="App\ApiClients\CloudPanel\Resources\" />
|
||||||
<Folder Include="App\Http\Middleware" />
|
<Folder Include="App\Http\Middleware" />
|
||||||
<Folder Include="storage\backups\" />
|
<Folder Include="storage\backups\" />
|
||||||
|
<Folder Include="storage\plugins\" />
|
||||||
<Folder Include="storage\resources\public\background\" />
|
<Folder Include="storage\resources\public\background\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,14 @@
|
|||||||
@using Moonlight.App.Services
|
@using Moonlight.App.Services
|
||||||
@using CloudFlare.Client.Enumerators
|
@using CloudFlare.Client.Enumerators
|
||||||
@using Moonlight.App.Services.Interop
|
@using Moonlight.App.Services.Interop
|
||||||
|
@using Moonlight.App.Services.Sessions
|
||||||
|
|
||||||
@inject DomainRepository DomainRepository
|
@inject DomainRepository DomainRepository
|
||||||
@inject DomainService DomainService
|
@inject DomainService DomainService
|
||||||
@inject SmartTranslateService SmartTranslateService
|
@inject SmartTranslateService SmartTranslateService
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject AlertService AlertService
|
@inject AlertService AlertService
|
||||||
|
@inject IdentityService IdentityService
|
||||||
|
|
||||||
<LazyLoader Load="Load">
|
<LazyLoader Load="Load">
|
||||||
@if (Domain == null)
|
@if (Domain == null)
|
||||||
@@ -181,9 +183,6 @@
|
|||||||
[Parameter]
|
[Parameter]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
[CascadingParameter]
|
|
||||||
public User? User { get; set; }
|
|
||||||
|
|
||||||
private Domain? Domain;
|
private Domain? Domain;
|
||||||
private DnsRecord[] DnsRecords;
|
private DnsRecord[] DnsRecords;
|
||||||
private DnsRecord NewRecord = new()
|
private DnsRecord NewRecord = new()
|
||||||
@@ -205,13 +204,13 @@
|
|||||||
if (Domain == null)
|
if (Domain == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (User == null)
|
if (IdentityService.User == null)
|
||||||
{
|
{
|
||||||
Domain = null;
|
Domain = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Domain.Owner.Id != User.Id && !User.Admin)
|
if (Domain.Owner.Id != IdentityService.User.Id && !IdentityService.User.Admin)
|
||||||
{
|
{
|
||||||
Domain = null;
|
Domain = null;
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user