Merge pull request #8641 from AndyButland/defect/netcore-fixes-log-viewer-level-filter

Fixed log viewer level filter by correcting binding for provided array of selected values to filter by.
This commit is contained in:
Bjarke Berg
2020-08-18 13:53:44 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -2441,7 +2441,7 @@ namespace Umbraco.Web.Editors
// set up public access using role based access
[EnsureUserPermissionForContent("contentId", ActionProtect.ActionLetter)]
[HttpPost]
public IActionResult PostPublicAccess(int contentId, [FromQuery]string[] groups, [FromQuery]string[] usernames, int loginPageId, int errorPageId)
public IActionResult PostPublicAccess(int contentId, [FromQuery(Name = "groups[]")]string[] groups, [FromQuery(Name = "usernames[]")]string[] usernames, int loginPageId, int errorPageId)
{
if ((groups == null || groups.Any() == false) && (usernames == null || usernames.Any() == false))
{

View File

@@ -80,7 +80,7 @@ namespace Umbraco.Web.BackOffice.Controllers
}
[HttpGet]
public PagedResult<LogMessage> GetLogs(string orderDirection = "Descending", int pageNumber = 1, string filterExpression = null, [FromQuery]string[] logLevels = null, [FromQuery] DateTime? startDate = null,[FromQuery] DateTime? endDate = null)
public PagedResult<LogMessage> GetLogs(string orderDirection = "Descending", int pageNumber = 1, string filterExpression = null, [FromQuery(Name = "logLevels[]")]string[] logLevels = null, [FromQuery]DateTime? startDate = null, [FromQuery]DateTime? endDate = null)
{
var logTimePeriod = GetTimePeriod(startDate, endDate);