You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
just saw this in our code when I was fixing something else. can't 100% remember, but aren't the site drivers supposed to check permissions in the edit method as well.
public override IDisplayResult Edit(ISite site, WorkflowTrimmingSettings settings, BuildEditorContext context)
{
<!-- supposed to check auth here as well -->
return Initialize<WorkflowTrimmingViewModel>("WorkflowTrimming_Fields_Edit", async model =>
{
model.RetentionDays = settings.RetentionDays;
model.LastRunUtc = (await _workflowTrimmingStateDocumentManager.GetOrCreateImmutableAsync()).LastRunUtc;
model.Disabled = settings.Disabled;
foreach (var status in settings.Statuses ?? [])
{
model.Statuses.Single(statusItem => statusItem.Status == status).IsSelected = true;
}
}).Location("Content:5")
.OnGroup(GroupId);
}
public override async Task<IDisplayResult> UpdateAsync(ISite site, WorkflowTrimmingSettings settings, UpdateEditorContext context)
{
if (!await _authorizationService.AuthorizeAsync(_httpContextAccessor.HttpContext?.User, Permissions.ManageWorkflowSettings))
{
return null;
}
The text was updated successfully, but these errors were encountered:
just saw this in our code when I was fixing something else. can't 100% remember, but aren't the site drivers supposed to check permissions in the edit method as well.
The text was updated successfully, but these errors were encountered: