Quick-fix for server loading in user view
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -401,3 +401,4 @@ storage/
|
|||||||
.idea/.idea.Moonlight/.idea/dataSources.xml
|
.idea/.idea.Moonlight/.idea/dataSources.xml
|
||||||
Moonlight/wwwroot/css/theme.css
|
Moonlight/wwwroot/css/theme.css
|
||||||
Moonlight/wwwroot/css/theme.css.map
|
Moonlight/wwwroot/css/theme.css.map
|
||||||
|
.idea/.idea.Moonlight/.idea/discord.xml
|
||||||
|
|||||||
@@ -13,11 +13,13 @@
|
|||||||
@using MoonCore.Exceptions
|
@using MoonCore.Exceptions
|
||||||
@using Moonlight.Features.Servers.Configuration
|
@using Moonlight.Features.Servers.Configuration
|
||||||
@using MoonCore.Services
|
@using MoonCore.Services
|
||||||
|
@using Moonlight.Core.Services
|
||||||
|
|
||||||
@inject Repository<Server> ServerRepository
|
@inject Repository<Server> ServerRepository
|
||||||
@inject ServerService ServerService
|
@inject ServerService ServerService
|
||||||
@inject ToastService ToastService
|
@inject ToastService ToastService
|
||||||
@inject AlertService AlertService
|
@inject AlertService AlertService
|
||||||
|
@inject IdentityService IdentityService
|
||||||
@inject ConfigService<ServersConfiguration> ConfigService
|
@inject ConfigService<ServersConfiguration> ConfigService
|
||||||
|
|
||||||
@implements IDisposable
|
@implements IDisposable
|
||||||
@@ -217,6 +219,12 @@
|
|||||||
.Include(x => x.Owner)
|
.Include(x => x.Owner)
|
||||||
.First(x => x.Id == Id);
|
.First(x => x.Id == Id);
|
||||||
|
|
||||||
|
if (Server.Owner.Id != IdentityService.CurrentUser.Id && IdentityService.CurrentUser.Permissions < 5000)
|
||||||
|
{
|
||||||
|
Server = null!;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
await lazyLoader.SetText("Establishing a connection to the server");
|
await lazyLoader.SetText("Establishing a connection to the server");
|
||||||
|
|
||||||
// Create console wrapper
|
// Create console wrapper
|
||||||
|
|||||||
Reference in New Issue
Block a user