Quick-fix for server loading in user view
This commit is contained in:
parent
3f0cdff262
commit
b608a0779c
2 changed files with 10 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -400,4 +400,5 @@ FodyWeavers.xsd
|
|||
storage/
|
||||
.idea/.idea.Moonlight/.idea/dataSources.xml
|
||||
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 Moonlight.Features.Servers.Configuration
|
||||
@using MoonCore.Services
|
||||
@using Moonlight.Core.Services
|
||||
|
||||
@inject Repository<Server> ServerRepository
|
||||
@inject ServerService ServerService
|
||||
@inject ToastService ToastService
|
||||
@inject AlertService AlertService
|
||||
@inject IdentityService IdentityService
|
||||
@inject ConfigService<ServersConfiguration> ConfigService
|
||||
|
||||
@implements IDisposable
|
||||
|
@ -217,6 +219,12 @@
|
|||
.Include(x => x.Owner)
|
||||
.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");
|
||||
|
||||
// Create console wrapper
|
||||
|
|
Loading…
Reference in a new issue