1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

prevent starting if no servers can be connected to

fix nextmap issue on t6
fix bug with kicking client for profane name
This commit is contained in:
RaidMax
2019-04-16 11:32:42 -05:00
parent 7c309ee460
commit 62f3ecba1c
10 changed files with 65 additions and 20 deletions

View File

@ -12,12 +12,22 @@ namespace WebfrontCore.Controllers
{
public IActionResult Edit()
{
if (Client.Level != SharedLibraryCore.Database.Models.EFClient.Permission.Owner)
{
return Unauthorized();
}
return View("Index", Manager.GetApplicationSettings().Configuration());
}
[HttpPost]
public async Task<IActionResult> Edit(ApplicationConfiguration newConfiguration, bool addNewServer = false, bool shouldSave = false)
{
if (Client.Level != SharedLibraryCore.Database.Models.EFClient.Permission.Owner)
{
return Unauthorized();
}
if (shouldSave)
{
var currentConfiguration = Manager.GetApplicationSettings().Configuration();
@ -48,6 +58,11 @@ namespace WebfrontCore.Controllers
public IActionResult GetNewListItem(string propertyName, int itemCount)
{
if (Client.Level != SharedLibraryCore.Database.Models.EFClient.Permission.Owner)
{
return Unauthorized();
}
var configInfo = new ConfigurationInfo()
{
NewItemCount = itemCount,