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:
@ -140,9 +140,14 @@ namespace WebfrontCore.Controllers
|
||||
|
||||
public async Task<IActionResult> Meta(int id, int count, int offset, DateTime? startAt)
|
||||
{
|
||||
var meta = await MetaService.GetRuntimeMeta(id, startAt == null ? offset : 0, count, startAt ?? DateTime.UtcNow);
|
||||
IEnumerable<ProfileMeta> meta = await MetaService.GetRuntimeMeta(id, startAt == null ? offset : 0, count, startAt ?? DateTime.UtcNow);
|
||||
|
||||
if (meta.Count == 0)
|
||||
if (!Authorized)
|
||||
{
|
||||
meta = meta.Where(_meta => !_meta.Sensitive);
|
||||
}
|
||||
|
||||
if (meta.Count() == 0)
|
||||
{
|
||||
return Ok();
|
||||
}
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user