private void RptContents_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType != ListItemType.Item && e.Item.ItemType != ListItemType.AlternatingItem) { return; } var contentInfo = new ContentInfo((IDataRecord)e.Item.DataItem); var ltlTitle = (Literal)e.Item.FindControl("ltlTitle"); var ltlColumns = (Literal)e.Item.FindControl("ltlColumns"); var ltlStatus = (Literal)e.Item.FindControl("ltlStatus"); var ltlCommands = (Literal)e.Item.FindControl("ltlCommands"); var ltlSelect = (Literal)e.Item.FindControl("ltlSelect"); ltlTitle.Text = WebUtils.GetContentTitle(SiteInfo, contentInfo, PageUrl); ltlColumns.Text = TextUtility.GetColumnsHtml(_nameValueCacheDict, SiteInfo, contentInfo, _attributesOfDisplay, _allStyleInfoList, _pluginColumns); ltlStatus.Text = $@"<a href=""javascript:;"" title=""设置内容状态"" onclick=""{ModalCheckState.GetOpenWindowString(SiteId, contentInfo, PageUrl)}"">{CheckManager.GetCheckState(SiteInfo, contentInfo)}</a>"; var pluginMenus = PluginMenuManager.GetContentMenus(_pluginIds, contentInfo); ltlCommands.Text = TextUtility.GetCommandsHtml(SiteInfo, pluginMenus, contentInfo, PageUrl, AuthRequest.AdminName, _isEdit); ltlSelect.Text = $@"<input type=""checkbox"" name=""contentIdCollection"" value=""{contentInfo.Id}"" />"; }
public static string GetCommandsHtml(SiteInfo siteInfo, Dictionary <string, List <Menu> > pluginMenus, ContentInfo contentInfo, string pageUrl, string administratorName, bool isEdit) { var builder = new StringBuilder(); if (isEdit || administratorName == contentInfo.AddUserName) { builder.Append($@"<a href=""{PageContentAdd.GetRedirectUrlOfEdit(siteInfo.Id, contentInfo.ChannelId, contentInfo.Id, pageUrl)}"">编辑</a>"); } if (pluginMenus != null) { foreach (var pluginId in pluginMenus.Keys) { var contentMenus = pluginMenus[pluginId]; if (contentMenus != null && contentMenus.Count > 0) { foreach (var menu in contentMenus) { var href = PluginMenuManager.GetMenuContentHref(pluginId, menu.Href, siteInfo.Id, contentInfo.ChannelId, contentInfo.Id, pageUrl); builder.Append(string.IsNullOrEmpty(menu.Target) ? $@"<a class=""m-l-5"" href=""javascript:;"" onclick=""{LayerUtils.GetOpenScript(menu.Text, href)}"">{menu.Text}</a>" : $@"<a class=""m-l-5"" href=""{href}"" target=""{menu.Target}"">{menu.Text}</a>"); } } } } return(builder.ToString()); }
private ChannelTreeItem(SiteInfo siteInfo, ChannelInfo channelInfo, bool enabled, PermissionManager permissionManager) { _siteInfo = siteInfo; _channelInfo = channelInfo; _enabled = enabled; _permissionManager = permissionManager; var treeDirectoryUrl = SiteServerAssets.GetIconUrl("tree"); _contentModelIconUrl = PageUtils.Combine(treeDirectoryUrl, "folder.gif"); _iconEmptyUrl = PageUtils.Combine(treeDirectoryUrl, "empty.gif"); _iconMinusUrl = PageUtils.Combine(treeDirectoryUrl, "minus.png"); _iconPlusUrl = PageUtils.Combine(treeDirectoryUrl, "plus.png"); if (!string.IsNullOrEmpty(channelInfo.ContentModelPluginId)) { _contentModelIconClass = PluginMenuManager.GetPluginIconClass(channelInfo.ContentModelPluginId); if (string.IsNullOrEmpty(_contentModelIconClass)) { var iconUrl = PluginManager.GetPluginIconUrl(channelInfo.ContentModelPluginId); if (!string.IsNullOrEmpty(iconUrl)) { _contentModelIconUrl = iconUrl; } } } }
public object GetIndex(RequestImpl request) { var menus = new List <object>(); var defaultPageUrl = string.Empty; if (request.IsUserLoggin) { var userMenus = UserMenuManager.GetAllUserMenuInfoList(); foreach (var menuInfo1 in userMenus) { if (menuInfo1.IsDisabled || menuInfo1.ParentId != 0 || !string.IsNullOrEmpty(menuInfo1.GroupIdCollection) && !StringUtils.In(menuInfo1.GroupIdCollection, request.UserInfo.GroupId)) { continue; } var children = new List <object>(); foreach (var menuInfo2 in userMenus) { if (menuInfo2.IsDisabled || menuInfo2.ParentId != menuInfo1.Id || !string.IsNullOrEmpty(menuInfo2.GroupIdCollection) && !StringUtils.In(menuInfo2.GroupIdCollection, request.UserInfo.GroupId)) { continue; } children.Add(new { menuInfo2.Text, menuInfo2.IconClass, menuInfo2.Href, menuInfo2.Target }); } menus.Add(new { menuInfo1.Text, menuInfo1.IconClass, menuInfo1.Href, menuInfo1.Target, Menus = children }); } defaultPageUrl = PluginMenuManager.GetHomeDefaultPageUrl(); } return(new { Value = request.UserInfo, Config = ConfigManager.Instance.SystemConfigInfo, Menus = menus, DefaultPageUrl = defaultPageUrl }); }
private void RptContents_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType != ListItemType.Item && e.Item.ItemType != ListItemType.AlternatingItem) { return; } var contentInfo = new ContentInfo((IDataRecord)e.Item.DataItem); var ltlTitle = (Literal)e.Item.FindControl("ltlTitle"); var ltlChannel = (Literal)e.Item.FindControl("ltlChannel"); var ltlColumns = (Literal)e.Item.FindControl("ltlColumns"); var ltlStatus = (Literal)e.Item.FindControl("ltlStatus"); var ltlSelect = (Literal)e.Item.FindControl("ltlSelect"); ltlTitle.Text = WebUtils.GetContentTitle(SiteInfo, contentInfo, PageUrl); var specialHtml = string.Empty; if (_isTrashOnly) { specialHtml = DateUtils.GetDateAndTimeString(contentInfo.LastEditDate); } else { var pluginMenus = PluginMenuManager.GetContentMenus(_pluginIds, contentInfo); specialHtml = TextUtility.GetCommandsHtml(SiteInfo, pluginMenus, contentInfo, PageUrl, AuthRequest.AdminName, _isEdit); } ltlColumns.Text = $@" {TextUtility.GetColumnsHtml(_nameValueCacheDict, SiteInfo, contentInfo, _attributesOfDisplay, _allStyleInfoList, _pluginColumns)} <td class=""text-center text-nowrap""> {specialHtml} </td>"; string nodeName; if (!_nameValueCacheDict.TryGetValue(contentInfo.ChannelId.ToString(), out nodeName)) { nodeName = ChannelManager.GetChannelNameNavigation(SiteId, contentInfo.ChannelId); _nameValueCacheDict[contentInfo.ChannelId.ToString()] = nodeName; } ltlChannel.Text = nodeName; var checkState = CheckManager.GetCheckState(SiteInfo, contentInfo); ltlStatus.Text = _isTrashOnly ? checkState : $@"<a href=""javascript:;"" title=""设置内容状态"" onclick=""{ ModalCheckState.GetOpenWindowString(SiteId, contentInfo, PageUrl) }"">{checkState}</a>"; ltlSelect.Text = $@"<input type=""checkbox"" name=""IDsCollection"" value=""{contentInfo.ChannelId}_{contentInfo.Id}"" />"; }
private void LoadValuesFromConfigurationXml(XmlDocument doc) { var coreNode = doc.SelectSingleNode("Config"); if (coreNode != null) { var isMultiple = true; foreach (XmlNode child in coreNode.ChildNodes) { if (child.NodeType == XmlNodeType.Comment) { continue; } if (child.Name == "generalPermissions") { GetPermissions(child, GeneralPermissions); } else if (child.Name == "websitePermissions") { GetPermissions(child, WebsiteSysPermissions); GetPermissions(child, WebsitePermissions); } else if (child.Name == "channelPermissions") { GetPermissions(child, ChannelPermissions); } else { isMultiple = false; break; } } if (!isMultiple) { GetPermissions(coreNode, GeneralPermissions); } } GeneralPermissions.AddRange(PluginMenuManager.GetTopPermissions()); var pluginPermissions = PluginMenuManager.GetSitePermissions(0); WebsitePluginPermissions.AddRange(pluginPermissions); WebsitePermissions.AddRange(pluginPermissions); }
public static string GetCommandsHtml(SiteInfo siteInfo, Dictionary<string, List<HyperLink>> pluginLinks, ContentInfo contentInfo, string pageUrl, string administratorName, bool isEdit) { var builder = new StringBuilder(); if (isEdit || administratorName == contentInfo.AddUserName) { builder.Append($@"<a href=""{PageContentAdd.GetRedirectUrlOfEdit(siteInfo.Id, contentInfo.ChannelId, contentInfo.Id, pageUrl)}"">编辑</a>"); } //if (isComment) //{ // //var urlComment = PageComment.GetRedirectUrl(siteInfo.SiteId, contentInfo.ChannelId, contentInfo.Id, pageUrl); // var urlComment = PageComments.GetRedirectUrl(siteInfo.Id, contentInfo.ChannelId, contentInfo.Id, pageUrl); // builder.Append( // $@"<a style=""margin:0 5px"" href=""{urlComment}"">评论<span style=""color:gray"">({contentInfo // .Comments})</span></a>"); //} if (pluginLinks != null) { foreach (var pluginId in pluginLinks.Keys) { var contentLinks = pluginLinks[pluginId]; if (contentLinks != null && contentLinks.Count > 0) { foreach (var link in contentLinks) { var originalUrl = link.NavigateUrl; link.NavigateUrl = PluginMenuManager.GetMenuContentHref(pluginId, originalUrl, siteInfo.Id, contentInfo.ChannelId, contentInfo.Id, pageUrl); builder.Append(" ").Append(ControlUtils.GetControlRenderHtml(link)); link.NavigateUrl = originalUrl; //builder.Append( // $@"<a style=""margin:0 5px"" href=""{href}"" {(string.IsNullOrEmpty(link.Target) ? string.Empty : "target='" + link.Target + "'")}>{link.Text}</a>"); } } } } return builder.ToString(); }
public static string GetNodeTreeLastImageHtml(SiteInfo siteInfo, ChannelInfo nodeInfo) { var imageHtml = string.Empty; if (nodeInfo.ParentId == 0) { var treeDirectoryUrl = SiteServerAssets.GetIconUrl("tree"); if (siteInfo.IsRoot == false) { imageHtml = $@"<img align=""absmiddle"" title=""站点"" border=""0"" src=""{PageUtils.Combine(treeDirectoryUrl, "site.gif")}"" /> "; } else { imageHtml = $@"<img align=""absmiddle"" title=""站点"" border=""0"" src=""{PageUtils.Combine(treeDirectoryUrl, "siteHQ.gif")}"" /> "; } } if (!string.IsNullOrEmpty(nodeInfo.ContentRelatedPluginIds)) { foreach (var service in PluginContentManager.GetContentPlugins(nodeInfo, false)) { var iconClass = PluginMenuManager.GetPluginIconClass(service.PluginId); if (!string.IsNullOrEmpty(iconClass)) { imageHtml += $@"<i class=""{iconClass}"" title=""{service.Metadata.Title}"" style=""color: #00b19d;display: inline-block;font-size: 18px;vertical-align: middle;width: 16px;""></i>"; } else { imageHtml += $@"<img align=""absmiddle"" title=""{service.Metadata.Title}"" border=""0"" src=""{PluginManager.GetPluginIconUrl(service)}"" width=""18"" height=""18"" />"; } } } return(imageHtml); }
public IHttpActionResult Get() { try { var request = new AuthenticatedRequest(); var siteId = request.GetQueryInt("siteId"); var channelId = request.GetQueryInt("channelId"); var page = request.GetQueryInt("page"); if (!request.IsAdminLoggin || !request.AdminPermissionsImpl.HasChannelPermissions(siteId, channelId, ConfigManager.ChannelPermissions.ContentView)) { return(Unauthorized()); } var siteInfo = SiteManager.GetSiteInfo(siteId); if (siteInfo == null) { return(BadRequest("无法确定内容对应的站点")); } var channelInfo = ChannelManager.GetChannelInfo(siteId, channelId); if (channelInfo == null) { return(BadRequest("无法确定内容对应的栏目")); } var onlyAdminId = request.AdminPermissionsImpl.GetOnlyAdminId(siteId, channelId); var pluginIds = PluginContentManager.GetContentPluginIds(channelInfo); var pluginColumns = PluginContentManager.GetContentColumns(pluginIds); var columns = ContentManager.GetContentColumns(siteInfo, channelInfo, false); var pageContentInfoList = new List <ContentInfo>(); var count = ContentManager.GetCount(siteInfo, channelInfo, onlyAdminId); var pages = Convert.ToInt32(Math.Ceiling((double)count / siteInfo.Additional.PageSize)); if (pages == 0) { pages = 1; } if (count > 0) { var offset = siteInfo.Additional.PageSize * (page - 1); var limit = siteInfo.Additional.PageSize; var pageContentIds = ContentManager.GetContentIdList(siteInfo, channelInfo, onlyAdminId, offset, limit); var sequence = offset + 1; foreach (var contentId in pageContentIds) { var contentInfo = ContentManager.GetContentInfo(siteInfo, channelInfo, contentId); if (contentInfo == null) { continue; } var menus = PluginMenuManager.GetContentMenus(pluginIds, contentInfo); contentInfo.Set("PluginMenus", menus); pageContentInfoList.Add(ContentManager.Calculate(sequence++, contentInfo, columns, pluginColumns)); } } var permissions = new { IsAdd = request.AdminPermissionsImpl.HasChannelPermissions(siteInfo.Id, channelInfo.Id, ConfigManager.ChannelPermissions.ContentAdd) && channelInfo.Additional.IsContentAddable, IsDelete = request.AdminPermissionsImpl.HasChannelPermissions(siteInfo.Id, channelInfo.Id, ConfigManager.ChannelPermissions.ContentDelete), IsEdit = request.AdminPermissionsImpl.HasChannelPermissions(siteInfo.Id, channelInfo.Id, ConfigManager.ChannelPermissions.ContentEdit), IsTranslate = request.AdminPermissionsImpl.HasChannelPermissions(siteInfo.Id, channelInfo.Id, ConfigManager.ChannelPermissions.ContentTranslate), IsCheck = request.AdminPermissionsImpl.HasChannelPermissions(siteInfo.Id, channelInfo.Id, ConfigManager.ChannelPermissions.ContentCheck), IsCreate = request.AdminPermissionsImpl.HasSitePermissions(siteInfo.Id, ConfigManager.WebSitePermissions.Create) || request.AdminPermissionsImpl.HasChannelPermissions(siteInfo.Id, channelInfo.Id, ConfigManager.ChannelPermissions.CreatePage), IsChannelEdit = request.AdminPermissionsImpl.HasChannelPermissions(siteInfo.Id, channelInfo.Id, ConfigManager.ChannelPermissions.ChannelEdit) }; return(Ok(new { Value = pageContentInfoList, Count = count, Pages = pages, Permissions = permissions, Columns = columns })); } catch (Exception ex) { LogUtils.AddErrorLog(ex); return(InternalServerError(ex)); } }
public static List <Tab> GetTabList(string topId, int siteId) { var tabs = new List <Tab>(); if (!string.IsNullOrEmpty(topId)) { var filePath = PathUtils.GetMenusPath($"{topId}.config"); var tabCollection = TabCollection.GetTabs(filePath); if (tabCollection?.Tabs != null) { foreach (var tabCollectionTab in tabCollection.Tabs) { tabs.Add(tabCollectionTab.Clone()); } } } var menus = new Dictionary <string, Menu>(); if (siteId > 0 && topId == string.Empty) { var siteMenus = PluginMenuManager.GetSiteMenus(siteId); if (siteMenus != null) { foreach (var siteMenu in siteMenus) { menus.Add(siteMenu.Key, siteMenu.Value); } } } else if (topId == "Plugins") { var topMenus = PluginMenuManager.GetTopMenus(); if (topMenus != null) { foreach (var topMenu in topMenus) { menus.Add(topMenu.Key, topMenu.Value); } } } foreach (var pluginId in menus.Keys) { var menu = menus[pluginId]; var isExists = false; foreach (var childTab in tabs) { if (childTab.Id == menu.Id) { isExists = true; } } if (isExists) { continue; } tabs.Add(GetPluginTab(menu, pluginId)); //if (string.IsNullOrEmpty(menu.ParentId)) //{ // var isExists = false; // foreach (var childTab in tabs) // { // if (childTab.Id == menu.Id) // { // isExists = true; // } // } // if (isExists) continue; // tabs.Add(GetPluginTab(menu)); //} //else //{ // foreach (var tab in tabs) // { // if (!StringUtils.EqualsIgnoreCase(menu.ParentId, tab.Id)) continue; // var isExists = false; // foreach (var childTab in tab.Children) // { // if (childTab.Id == menu.Id) // { // isExists = true; // } // } // if (isExists) continue; // var list = new List<Tab>(); // if (tab.Children != null) // { // list = tab.Children.ToList(); // } // list.Add(GetPluginTab(menu)); // tab.Children = list.ToArray(); // } //} } return(tabs); }
public IHttpActionResult Get() { try { var request = new AuthenticatedRequest(); var siteId = request.GetQueryInt("siteId"); var channelId = request.GetQueryInt("channelId"); var page = request.GetQueryInt("page"); var type = request.GetQueryString("type"); var keyword = request.GetQueryString("keyword"); if (!request.IsAdminLoggin || !request.AdminPermissionsImpl.HasChannelPermissions(siteId, channelId, ConfigManager.ChannelPermissions.ContentView, ConfigManager.ChannelPermissions.ContentAdd, ConfigManager.ChannelPermissions.ContentEdit, ConfigManager.ChannelPermissions.ContentDelete, ConfigManager.ChannelPermissions.ContentTranslate, ConfigManager.ChannelPermissions.ContentArrange, ConfigManager.ChannelPermissions.ContentCheck, ConfigManager.ChannelPermissions.ContentCheckLevel1, ConfigManager.ChannelPermissions.ContentCheckLevel2, ConfigManager.ChannelPermissions.ContentCheckLevel3, ConfigManager.ChannelPermissions.ContentCheckLevel4, ConfigManager.ChannelPermissions.ContentCheckLevel5)) { return(Unauthorized()); } var siteInfo = SiteManager.GetSiteInfo(siteId); if (siteInfo == null) { return(BadRequest("无法确定内容对应的站点")); } var channelInfo = ChannelManager.GetChannelInfo(siteId, channelId); if (channelInfo == null) { return(BadRequest("无法确定内容对应的栏目")); } var adminId = channelInfo.Additional.IsSelfOnly ? request.AdminId : request.AdminPermissionsImpl.GetAdminId(siteId, channelId); var isAllContents = channelInfo.Additional.IsAllContents; var pluginIds = PluginContentManager.GetContentPluginIds(channelInfo); var pluginColumns = PluginContentManager.GetContentColumns(pluginIds); var columns = ContentManager.GetContentColumns(siteInfo, channelInfo, false); var pageContentInfoList = new List <ContentInfo>(); //var ccIds = DataProvider.ContentDao.GetCacheChannelContentIdList(siteInfo, channelInfo, adminId, isAllContents, type, keyword); var ccIds = ContentManager.GetChannelContentIdList(siteInfo, channelInfo, adminId, isAllContents); var count = ccIds.Count; var pages = Convert.ToInt32(Math.Ceiling((double)count / siteInfo.Additional.PageSize)); if (pages == 0) { pages = 1; } if (count > 0) { var offset = siteInfo.Additional.PageSize * (page - 1); var limit = siteInfo.Additional.PageSize; var pageCcIds = ccIds.Skip(offset).Take(limit).ToList(); var sequence = offset + 1; foreach (var(contentChannelId, contentId) in pageCcIds) { var contentInfo = ContentManager.GetContentInfo(siteInfo, contentChannelId, contentId); if (contentInfo == null) { continue; } var menus = PluginMenuManager.GetContentMenus(pluginIds, contentInfo); contentInfo.Set("PluginMenus", menus); var channelName = ChannelManager.GetChannelNameNavigation(siteId, channelId, contentChannelId); contentInfo.Set("ChannelName", channelName); pageContentInfoList.Add(ContentManager.Calculate(sequence++, contentInfo, columns, pluginColumns)); } } var permissions = new { IsAdd = request.AdminPermissionsImpl.HasChannelPermissions(siteInfo.Id, channelInfo.Id, ConfigManager.ChannelPermissions.ContentAdd) && channelInfo.Additional.IsContentAddable, IsDelete = request.AdminPermissionsImpl.HasChannelPermissions(siteInfo.Id, channelInfo.Id, ConfigManager.ChannelPermissions.ContentDelete), IsEdit = request.AdminPermissionsImpl.HasChannelPermissions(siteInfo.Id, channelInfo.Id, ConfigManager.ChannelPermissions.ContentEdit), IsTranslate = request.AdminPermissionsImpl.HasChannelPermissions(siteInfo.Id, channelInfo.Id, ConfigManager.ChannelPermissions.ContentTranslate), IsArrange = request.AdminPermissionsImpl.HasChannelPermissions(siteInfo.Id, channelInfo.Id, ConfigManager.ChannelPermissions.ContentArrange), IsCheck = request.AdminPermissionsImpl.HasChannelPermissions(siteInfo.Id, channelInfo.Id, ConfigManager.ChannelPermissions.ContentCheck), IsCreate = request.AdminPermissionsImpl.HasSitePermissions(siteInfo.Id, ConfigManager.SitePermissions.CreateContents) || request.AdminPermissionsImpl.HasChannelPermissions(siteInfo.Id, channelInfo.Id, ConfigManager.ChannelPermissions.CreatePage), IsChannelEdit = request.AdminPermissionsImpl.HasChannelPermissions(siteInfo.Id, channelInfo.Id, ConfigManager.ChannelPermissions.ChannelEdit) }; return(Ok(new { Value = pageContentInfoList, Count = count, Pages = pages, Permissions = permissions, Columns = columns, IsAllContents = isAllContents })); } catch (Exception ex) { LogUtils.AddErrorLog(ex); return(InternalServerError(ex)); } }
public IHttpActionResult GetConfig() { try { var request = new AuthenticatedRequest(); var redirect = request.AdminRedirectCheck(checkInstall: true, checkDatabaseVersion: true, checkLogin: true); if (redirect != null) { return(Ok(redirect)); } var siteId = request.GetQueryInt("siteId"); var siteInfo = SiteManager.GetSiteInfo(siteId); var adminInfo = request.AdminInfo; var permissions = request.AdminPermissionsImpl; var isSuperAdmin = permissions.IsConsoleAdministrator; var siteIdListWithPermissions = permissions.GetSiteIdList(); if (siteInfo == null || !siteIdListWithPermissions.Contains(siteInfo.Id)) { if (siteIdListWithPermissions.Contains(adminInfo.SiteId)) { return(Ok(new { Value = false, RedirectUrl = PageUtils.GetMainUrl(adminInfo.SiteId) })); } if (siteIdListWithPermissions.Count > 0) { return(Ok(new { Value = false, RedirectUrl = PageUtils.GetMainUrl(siteIdListWithPermissions[0]) })); } if (isSuperAdmin) { return(Ok(new { Value = false, RedirectUrl = PageSiteAdd.GetRedirectUrl() })); } return(Ok(new { Value = false, RedirectUrl = $"pageError.html?message={HttpUtility.UrlEncode("您没有可以管理的站点,请联系超级管理员协助解决")}" })); } var packageIds = new List <string> { PackageUtils.PackageIdSsCms }; var packageList = new List <object>(); var dict = PluginManager.GetPluginIdAndVersionDict(); foreach (var id in dict.Keys) { packageIds.Add(id); var version = dict[id]; packageList.Add(new { id, version }); } var siteIdListLatestAccessed = DataProvider.AdministratorDao.UpdateSiteId(adminInfo, siteInfo.Id); var permissionList = new List <string>(permissions.PermissionList); if (permissions.HasSitePermissions(siteInfo.Id)) { var websitePermissionList = permissions.GetSitePermissions(siteInfo.Id); if (websitePermissionList != null) { permissionList.AddRange(websitePermissionList); } } var channelPermissions = permissions.GetChannelPermissions(siteInfo.Id); if (channelPermissions.Count > 0) { permissionList.AddRange(channelPermissions); } var topMenus = GetTopMenus(siteInfo, isSuperAdmin, siteIdListLatestAccessed, siteIdListWithPermissions); var siteMenus = GetLeftMenus(siteInfo, ConfigManager.TopMenu.IdSite, isSuperAdmin, permissionList); var pluginMenus = GetLeftMenus(siteInfo, string.Empty, isSuperAdmin, permissionList); return(Ok(new { Value = true, DefaultPageUrl = PluginMenuManager.GetSystemDefaultPageUrl(siteId) ?? "dashboard.cshtml", IsNightly = WebConfigUtils.IsNightlyUpdate, SystemManager.ProductVersion, SystemManager.PluginVersion, SystemManager.TargetFramework, SystemManager.EnvironmentVersion, IsSuperAdmin = isSuperAdmin, PackageList = packageList, PackageIds = packageIds, TopMenus = topMenus, SiteMenus = siteMenus, PluginMenus = pluginMenus, Local = new { UserId = adminInfo.Id, adminInfo.UserName, adminInfo.AvatarUrl, Level = permissions.GetAdminLevel() } })); } catch (Exception ex) { return(InternalServerError(ex)); } }