Gets sln building, removes old legacy settings, removes ascx dashboard support
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user