Gets sln building, removes old legacy settings, removes ascx dashboard support

This commit is contained in:
Shannon
2018-12-03 16:14:49 +11:00
parent 953f37f2db
commit 162b90194d
25 changed files with 172 additions and 457 deletions

View File

@@ -17,17 +17,20 @@ namespace Umbraco.Web.Editors
[PluginController("UmbracoApi")]
public class SectionController : UmbracoAuthorizedJsonController
{
private readonly DashboardHelper _dashboardHelper;
public SectionController(DashboardHelper dashboardHelper)
{
_dashboardHelper = dashboardHelper;
}
public IEnumerable<Section> GetSections()
{
var sections = Services.SectionService.GetAllowedSections(Security.GetUserId().ResultOr(0));
var sectionModels = sections.Select(Mapper.Map<Core.Models.Section, Section>).ToArray();
//Check if there are empty dashboards or dashboards that will end up empty based on the current user's access
//and add the meta data about them
var dashboardHelper = new DashboardHelper(ApplicationContext);
// this is a bit nasty since we'll be proxying via the app tree controller but we sort of have to do that
// since tree's by nature are controllers and require request contextual data - and then we have to
// remember to inject properties - nasty indeed
@@ -36,7 +39,7 @@ namespace Umbraco.Web.Editors
Current.Container.InjectProperties(appTreeController);
appTreeController.ControllerContext = ControllerContext;
var dashboards = dashboardHelper.GetDashboards(Security.CurrentUser);
var dashboards = _dashboardHelper.GetDashboards(Security.CurrentUser);
//now we can add metadata for each section so that the UI knows if there's actually anything at all to render for
//a dashboard for a given section, then the UI can deal with it accordingly (i.e. redirect to the first tree)
foreach (var section in sectionModels)