protected bool IsModuleAdmin() { bool _IsModuleAdmin = Null.NullBoolean; foreach (ModuleInfo objModule in TabController.CurrentPage.Modules) { if (!objModule.IsDeleted) { bool blnHasModuleEditPermissions = ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Edit, Null.NullString, objModule); if (blnHasModuleEditPermissions && objModule.ModuleDefinition.DefaultCacheTime != -1) { _IsModuleAdmin = true; break; } } } return(PortalSettings.ControlPanelSecurity == PortalSettings.ControlPanelPermission.ModuleEditor && _IsModuleAdmin); }
/// <summary> /// 关于权限验证 /// </summary> protected virtual void Page_Init(System.Object sender, System.EventArgs e) { //如果不是此模块,则会抛出异常,提示非法入侵 if (!(("DNNGo.DNNGalleryPro").IndexOf(BaseModuleName, StringComparison.CurrentCultureIgnoreCase) >= 0)) { Response.Redirect(Globals.NavigateURL(TabId), true); } //没有登陆的用户 if (!(UserId > 0)) { Response.Redirect(Globals.NavigateURL(PortalSettings.LoginTabId, "Login", "returnurl=" + HttpUtility.UrlEncode(HttpContext.Current.Request.RawUrl)), true); } else if (!ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Edit, "CONTENT", ModuleConfiguration)) { Response.Redirect(Globals.NavigateURL(TabId), true); } }
private bool IsModuleAdmin(PortalSettings portalSettings) { bool isModuleAdmin = false; foreach (ModuleInfo objModule in TabController.CurrentPage.Modules) { if (!objModule.IsDeleted) { bool blnHasModuleEditPermissions = ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Edit, Null.NullString, objModule); if (blnHasModuleEditPermissions) { isModuleAdmin = true; break; } } } return(portalSettings.ControlPanelSecurity == PortalSettings.ControlPanelPermission.ModuleEditor && isModuleAdmin); }
internal static bool IsModuleAdminInternal() { bool _IsModuleAdmin = Null.NullBoolean; foreach (ModuleInfo objModule in TabController.CurrentPage.Modules) { if (!objModule.IsDeleted) { bool blnHasModuleEditPermissions = ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Edit, Null.NullString, objModule); if (blnHasModuleEditPermissions) { _IsModuleAdmin = true; break; } } } return(PortalController.Instance.GetCurrentPortalSettings().ControlPanelSecurity == PortalSettings.ControlPanelPermission.ModuleEditor && _IsModuleAdmin); }
private bool UserIsModuleEditor() => Log.Intercept(nameof(UserIsModuleEditor), () => { if (Module == null) { return(false); } // This seems to throw errors during search :( try { return(ModulePermissionController .HasModuleAccess(SecurityAccessLevel.Edit, "", Module)); } catch { return(false); } });
private bool IsModuleAdmin() { bool moduleAdmin = Null.NullBoolean; var portalSettings = PortalController.Instance.GetCurrentPortalSettings(); foreach (ModuleInfo module in TabController.CurrentPage.Modules) { if (!module.IsDeleted) { bool hasEditPermissions = ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Edit, Null.NullString, module); if (hasEditPermissions) { moduleAdmin = true; break; } } } return(portalSettings.ControlPanelSecurity == PortalSettings.ControlPanelPermission.ModuleEditor && moduleAdmin); }
/// <summary> /// Check if current user is Module admin of any module in the passed page. /// </summary> /// <param name="portalSettings">Portal Settings related with the portal which contains the tab.</param> /// <param name="tab">Tab to check.</param> /// <returns>Returns true if current user has admin permission over some module in the passed page. Otherwise, returns false.</returns> public static bool IsModuleAdmin(PortalSettings portalSettings, TabInfo tab) { var isModuleAdmin = false; foreach (ModuleInfo objModule in tab.Modules) { if (!objModule.IsDeleted) { bool blnHasModuleEditPermissions = ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Edit, Null.NullString, objModule); if (blnHasModuleEditPermissions) { isModuleAdmin = true; break; } } } return(portalSettings.ControlPanelSecurity == PortalSettings.ControlPanelPermission.ModuleEditor && isModuleAdmin); }
/// <summary> /// Handles the <see cref="Control.Load"/> event of this control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void Page_Load(object sender, EventArgs e) { this.Visible = this.IsAdmin; this.HomeLink.NavigateUrl = Globals.NavigateURL(); this.AddNewLink.NavigateUrl = this.BuildLinkUrl(this.ModuleId, ControlKey.EditSurvey); this.ManageLink.NavigateUrl = this.BuildLinkUrl(this.ModuleId, ControlKey.SurveyListing); this.SettingsLink.NavigateUrl = Globals.NavigateURL(this.TabId, "Module", "ModuleId=" + this.ModuleId); this.HomeLink.ToolTip = this.Localize("HomeLink.ToolTip"); this.AddNewLink.ToolTip = this.Localize("AddNewLink.ToolTip"); this.ManageLink.ToolTip = this.Localize("ManageLink.ToolTip"); this.SettingsLink.ToolTip = this.Localize("SettingsLink.ToolTip"); // Settings is actually accessible via URL with SecurityAccessLevel.Edit, but .Admin is the check that ModuleInstanceContext does when adding to the action menu var isSettingsAvailableInModuleActions = ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "MANAGE", this.ModuleConfiguration); this.SettingsListItem.Visible = isSettingsAvailableInModuleActions; this.ManageListItem.Visible = ModuleSettings.DisplayType.GetValueAsEnumFor <ControlKey>(this) != ControlKey.SurveyListing; }
/// ----------------------------------------------------------------------------- /// <summary> /// IsVisible determines whether the action control is Visible /// </summary> /// <param name="action">The Action</param> /// <history> /// [cnurse] 12/23/2007 documented /// </history> /// ----------------------------------------------------------------------------- public bool IsVisible(ModuleAction action) { bool _IsVisible = false; if (action.Visible && ModulePermissionController.HasModuleAccess(action.Secure, Null.NullString, ModuleContext.Configuration)) { if ((ModuleContext.PortalSettings.UserMode == PortalSettings.Mode.Edit) || (action.Secure == SecurityAccessLevel.Anonymous || action.Secure == SecurityAccessLevel.View)) { _IsVisible = true; } else { _IsVisible = false; } } else { _IsVisible = false; } return(_IsVisible); }
private void RecycleDelete() { var module = new ModuleController().GetModule(ModuleId); if (ForumUser.IsAdmin || ForumUser.IsSuperUser || ModulePermissionController.HasModuleAccess(Security.SecurityAccessLevel.Edit, "EDIT", module)) { int id = -1; if (Params.ContainsKey("ContentId")) { id = Convert.ToInt32(Params["ContentId"]); } else if (Params.ContainsKey("TopicId")) { id = Convert.ToInt32(Params["TopicId"]); } if (id == -1) { return; } } }
private bool ProcessSlaveModule() { var success = true; var key = UIUtilities.GetControlKey(); var moduleId = UIUtilities.GetModuleId(key); var slaveModule = UIUtilities.GetSlaveModule(moduleId, key, PortalSettings.ActiveTab.TabID); Pane pane; Panes.TryGetValue(Globals.glbDefaultPane.ToLowerInvariant(), out pane); slaveModule.PaneName = Globals.glbDefaultPane; slaveModule.ContainerSrc = PortalSettings.ActiveTab.ContainerSrc; if (String.IsNullOrEmpty(slaveModule.ContainerSrc)) { slaveModule.ContainerSrc = PortalSettings.DefaultPortalContainer; } slaveModule.ContainerSrc = SkinController.FormatSkinSrc(slaveModule.ContainerSrc, PortalSettings); slaveModule.ContainerPath = SkinController.FormatSkinPath(slaveModule.ContainerSrc); var moduleControl = ModuleControlController.GetModuleControlByControlKey(key, slaveModule.ModuleDefID); if (moduleControl != null) { slaveModule.ModuleControlId = moduleControl.ModuleControlID; slaveModule.IconFile = moduleControl.IconFile; if (ModulePermissionController.HasModuleAccess(slaveModule.ModuleControl.ControlType, Null.NullString, slaveModule)) { success = InjectModule(pane, slaveModule); } else { Response.Redirect(Globals.AccessDeniedURL(Localization.GetString("ModuleAccess.Error")), true); } } return(success); }
/// <summary> /// cstor /// </summary> /// <param name="moduleId"></param> /// <param name="tabId"></param> /// <param name="ipAddress"></param> /// <param name="user"></param> public FloodControl(int moduleId, int tabId, string ipAddress, UserInfo user) { this.moduleId = moduleId; this.tabId = tabId; this.ipAddress = ipAddress; this.user = user; if (user != null) { //work out if the userinfo //object has edit permission on this module var moduleInfo = ModuleController.Instance.GetModule(moduleId, tabId, false); hasEditAccess = ModulePermissionController .HasModuleAccess(SecurityAccessLevel.Edit, null, moduleInfo); //load the flood control settings var settings = new ShoutBoxModuleSettings(moduleId, tabId); floodTimePost = settings.FloodNewPost; floodTimeReply = settings.FloodReply; floodTimeVote = settings.FloodVoting; } }
private bool UserHasRights(int tabId) { var modules = new ModuleController(); Dictionary <int, ModuleInfo> tabModules = modules.GetTabModules(tabId); foreach (ModuleInfo module in tabModules.Values) { if (module.DesktopModule.FriendlyName.Equals(Utility.DnnFriendlyModuleName)) { bool overrideable; object overrideableObj = module.TabModuleSettings["Overrideable"]; if (overrideableObj != null && bool.TryParse(overrideableObj.ToString(), out overrideable) && overrideable) { //keep checking until there is an overrideable module that the user is authorized to see. BD //if (PortalSecurity.HasNecessaryPermission(SecurityAccessLevel.View, PortalSettings, module)) if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.View, string.Empty, module)) { return(true); } } } } return(false); }
private bool IsViewMode() { return(!(ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Edit, Null.NullString, _ModuleConfiguration)) || PortalSettings.UserMode == PortalSettings.Mode.View); }
protected virtual bool HasModuleAccess() { return(ModulePermissionController.HasModuleAccess(AccessLevel, PermissionKey, _module)); }
private int DoAddExistingModule(int moduleId, int tabId, string paneName, int position, string align, bool cloneModule) { ModuleInfo moduleInfo = ModuleController.Instance.GetModule(moduleId, tabId, false); int userID = -1; UserInfo user = UserController.Instance.GetCurrentUserInfo(); if (user != null) { userID = user.UserID; } if (moduleInfo != null && !moduleInfo.IsDeleted) { // Is this from a site other than our own? (i.e., is the user requesting "module sharing"?) var remote = moduleInfo.PortalID != PortalSettings.Current.PortalId; if (remote) { switch (moduleInfo.DesktopModule.Shareable) { case ModuleSharing.Unsupported: // Should never happen since the module should not be listed in the first place. throw new ApplicationException(string.Format( "Module '{0}' does not support Shareable and should not be listed in Add Existing Module from a different source site", moduleInfo.DesktopModule.FriendlyName)); case ModuleSharing.Supported: break; case ModuleSharing.Unknown: break; } } if (!ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Edit, "MANAGE", moduleInfo)) { throw new SecurityException($"Module '{moduleInfo.ModuleID}' is not available in current context."); } // clone the module object ( to avoid creating an object reference to the data cache ) ModuleInfo newModule = moduleInfo.Clone(); newModule.UniqueId = Guid.NewGuid(); // Cloned Module requires a different uniqueID newModule.TabModuleID = Null.NullInteger; newModule.PortalID = PortalSettings.Current.PortalId; newModule.TabID = PortalSettings.Current.ActiveTab.TabID; newModule.ModuleOrder = position; newModule.PaneName = paneName; newModule.Alignment = align; if (cloneModule) { newModule.ModuleID = Null.NullInteger; // copy module settings and tab module settings newModule.ModuleSettings.Clear(); foreach (var key in moduleInfo.ModuleSettings.Keys) { newModule.ModuleSettings.Add(key, moduleInfo.ModuleSettings[key]); } newModule.TabModuleSettings.Clear(); foreach (var key in moduleInfo.TabModuleSettings.Keys) { newModule.TabModuleSettings.Add(key, moduleInfo.TabModuleSettings[key]); } // reset the module id newModule.ModuleID = ModuleController.Instance.AddModule(newModule); if (!string.IsNullOrEmpty(newModule.DesktopModule.BusinessControllerClass)) { object objObject = DotNetNuke.Framework.Reflection.CreateObject(newModule.DesktopModule.BusinessControllerClass, newModule.DesktopModule.BusinessControllerClass); if (objObject is IPortable) { try { SetCloneModuleContext(true); string content = Convert.ToString(((IPortable)objObject).ExportModule(moduleId)); if (!string.IsNullOrEmpty(content)) { ((IPortable)objObject).ImportModule(newModule.ModuleID, content, newModule.DesktopModule.Version, userID); } } finally { SetCloneModuleContext(false); } } } } else { // copy tab module settings newModule.TabModuleSettings.Clear(); foreach (var key in moduleInfo.TabModuleSettings.Keys) { newModule.TabModuleSettings.Add(key, moduleInfo.TabModuleSettings[key]); } ModuleController.Instance.AddModule(newModule); } // if the tab of original module has custom stylesheet defined, then also copy the stylesheet // to the destination tab if its custom stylesheet is empty. var originalTab = TabController.Instance.GetTab(moduleInfo.TabID, moduleInfo.PortalID); var targetTab = PortalSettings.Current.ActiveTab; if (originalTab != null && originalTab.TabSettings.ContainsKey("CustomStylesheet") && !string.IsNullOrEmpty(originalTab.TabSettings["CustomStylesheet"].ToString()) && (!targetTab.TabSettings.ContainsKey("CustomStylesheet") || string.IsNullOrEmpty(targetTab.TabSettings["CustomStylesheet"].ToString()))) { TabController.Instance.UpdateTabSetting(targetTab.TabID, "CustomStylesheet", originalTab.TabSettings["CustomStylesheet"].ToString()); } if (remote) { // Ensure the Portal Admin has View rights var permissionController = new PermissionController(); ArrayList arrSystemModuleViewPermissions = permissionController.GetPermissionByCodeAndKey("SYSTEM_MODULE_DEFINITION", "VIEW"); this.AddModulePermission( newModule, (PermissionInfo)arrSystemModuleViewPermissions[0], PortalSettings.Current.AdministratorRoleId, Null.NullInteger, true); // Set PortalID correctly newModule.OwnerPortalID = newModule.PortalID; newModule.PortalID = PortalSettings.Current.PortalId; ModulePermissionController.SaveModulePermissions(newModule); } // Add Event Log EventLogController.Instance.AddLog(newModule, PortalSettings.Current, userID, string.Empty, EventLogController.EventLogType.MODULE_CREATED); return(newModule.ModuleID); } return(-1); }
protected virtual bool HasModuleAccess() { return(ModulePermissionController.HasModuleAccess(this.AccessLevel, this.PermissionKey, this.module)); }
private static void AddChildActions(ModuleAction objParentAction, Node objParentNode, Node objRootNode, IActionControl objActionControl, int intDepth) { bool blnPending; foreach (ModuleAction objAction in objParentAction.Actions) { blnPending = IsActionPending(objParentNode, objRootNode, intDepth); if (objAction.Title == "~") { if (blnPending == false) { objParentNode.Nodes.AddBreak(); } } else { if (objAction.Visible == true && (objAction.Secure != SecurityAccessLevel.Anonymous || ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Edit, "EDIT", objActionControl.ModuleControl.ModuleContext.Configuration)) && ModulePermissionController.HasModuleAccess(objAction.Secure, Null.NullString, objActionControl.ModuleControl.ModuleContext.Configuration)) { if (blnPending) { objParentNode.HasNodes = true; } else { Node objNode; int i = objParentNode.Nodes.Add(); objNode = objParentNode.Nodes[i]; objNode.ID = objAction.ID.ToString(); objNode.Key = objAction.ID.ToString(); objNode.Text = objAction.Title; if (!String.IsNullOrEmpty(objAction.ClientScript)) { objNode.JSFunction = objAction.ClientScript; objNode.ClickAction = eClickAction.None; } else { objNode.NavigateURL = objAction.Url; if (objAction.UseActionEvent == false && !String.IsNullOrEmpty(objNode.NavigateURL)) { objNode.ClickAction = eClickAction.Navigate; if (objAction.NewWindow) { objNode.Target = "_blank"; } } else { objNode.ClickAction = eClickAction.PostBack; } } objNode.Image = objAction.Icon; if (objAction.HasChildren()) { AddChildActions(objAction, objNode, objRootNode, objActionControl, intDepth); } } } } } }
/// ----------------------------------------------------------------------------- /// <summary> /// Recursive function to add module's actions to the DNNNodeCollection based off of passed in ModuleActions /// </summary> /// <param name="objParentAction">Parent action</param> /// <param name="objParentNode">Parent node</param> /// <param name="objRootNode">Root Node.</param> /// <param name="objActionControl">ActionControl to base actions off of</param> /// <param name="intDepth">How many levels deep should be populated</param> /// <remarks> /// </remarks> /// <history> /// [Jon Henning] 5/15/2006 Created /// </history> /// ----------------------------------------------------------------------------- private static void AddChildActions(ModuleAction objParentAction, DNNNode objParentNode, DNNNode objRootNode, IActionControl objActionControl, int intDepth) { //Add Menu Items bool blnPending; foreach (ModuleAction objAction in objParentAction.Actions) { blnPending = IsActionPending(objParentNode, objRootNode, intDepth); if (objAction.Title == "~") { if (blnPending == false) { //A title (text) of ~ denotes a break objParentNode.DNNNodes.AddBreak(); } } else { //if action is visible and user has permission if (objAction.Visible && (objAction.Secure != SecurityAccessLevel.Anonymous || ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Edit, string.Empty, objActionControl.ModuleControl.ModuleContext.Configuration)) && ModulePermissionController.HasModuleAccess(objAction.Secure, Null.NullString, objActionControl.ModuleControl.ModuleContext.Configuration)) { if (blnPending) { objParentNode.HasNodes = true; } else { DNNNode objNode; int i = objParentNode.DNNNodes.Add(); objNode = objParentNode.DNNNodes[i]; objNode.ID = objAction.ID.ToString(); objNode.Key = objAction.ID.ToString(); objNode.Text = objAction.Title; //no longer including SPACE in generic node collection, each control must handle how they want to display if (string.IsNullOrEmpty(objAction.ClientScript) && string.IsNullOrEmpty(objAction.Url) && string.IsNullOrEmpty(objAction.CommandArgument)) { objNode.Enabled = false; } else if (!string.IsNullOrEmpty(objAction.ClientScript)) { objNode.JSFunction = objAction.ClientScript; objNode.ClickAction = eClickAction.None; } else { objNode.NavigateURL = objAction.Url; if (objAction.UseActionEvent == false && !String.IsNullOrEmpty(objNode.NavigateURL)) { objNode.ClickAction = eClickAction.Navigate; if (objAction.NewWindow) { objNode.Target = "_blank"; } } else { objNode.ClickAction = eClickAction.PostBack; } } objNode.Image = objAction.Icon; if (objAction.HasChildren()) //if action has children then call function recursively { AddChildActions(objAction, objNode, objRootNode, objActionControl, intDepth); } } } } } }
/// ----------------------------------------------------------------------------- /// <summary> /// LoadActions loads the Actions collections. /// </summary> /// <remarks> /// </remarks> /// ----------------------------------------------------------------------------- private void LoadActions(HttpRequest request) { this._actions = new ModuleActionCollection(); if (this.PortalSettings.IsLocked) { return; } this._moduleGenericActions = new ModuleAction(this.GetNextActionID(), Localization.GetString("ModuleGenericActions.Action", Localization.GlobalResourceFile), string.Empty, string.Empty, string.Empty); int maxActionId = Null.NullInteger; // check if module Implements Entities.Modules.IActionable interface var actionable = this._moduleControl as IActionable; if (actionable != null) { this._moduleSpecificActions = new ModuleAction(this.GetNextActionID(), Localization.GetString("ModuleSpecificActions.Action", Localization.GlobalResourceFile), string.Empty, string.Empty, string.Empty); ModuleActionCollection moduleActions = actionable.ModuleActions; foreach (ModuleAction action in moduleActions) { if (ModulePermissionController.HasModuleAccess(action.Secure, "CONTENT", this.Configuration)) { if (string.IsNullOrEmpty(action.Icon)) { action.Icon = "edit.gif"; } if (action.ID > maxActionId) { maxActionId = action.ID; } this._moduleSpecificActions.Actions.Add(action); if (!UIUtilities.IsLegacyUI(this.ModuleId, action.ControlKey, this.PortalId) && action.Url.Contains("ctl")) { action.ClientScript = UrlUtils.PopUpUrl(action.Url, this._moduleControl as Control, this.PortalSettings, true, false); } } } if (this._moduleSpecificActions.Actions.Count > 0) { this._actions.Add(this._moduleSpecificActions); } } // Make sure the Next Action Id counter is correct int actionCount = GetActionsCount(this._actions.Count, this._actions); if (this._nextActionId < maxActionId) { this._nextActionId = maxActionId; } if (this._nextActionId < actionCount) { this._nextActionId = actionCount; } // Custom injection of Module Settings when shared as ViewOnly if (this.Configuration != null && (this.Configuration.IsShared && this.Configuration.IsShareableViewOnly) && TabPermissionController.CanAddContentToPage()) { this._moduleGenericActions.Actions.Add( this.GetNextActionID(), Localization.GetString("ModulePermissions.Action", Localization.GlobalResourceFile), "ModulePermissions", string.Empty, "action_settings.gif", this.NavigateUrl(this.TabId, "ModulePermissions", false, "ModuleId=" + this.ModuleId, "ReturnURL=" + FilterUrl(request)), false, SecurityAccessLevel.ViewPermissions, true, false); } else { if (!Globals.IsAdminControl() && ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "DELETE,MANAGE", this.Configuration)) { if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "MANAGE", this.Configuration)) { this._moduleGenericActions.Actions.Add( this.GetNextActionID(), Localization.GetString(ModuleActionType.ModuleSettings, Localization.GlobalResourceFile), ModuleActionType.ModuleSettings, string.Empty, "action_settings.gif", this.NavigateUrl(this.TabId, "Module", false, "ModuleId=" + this.ModuleId, "ReturnURL=" + FilterUrl(request)), false, SecurityAccessLevel.Edit, true, false); } } } if (!string.IsNullOrEmpty(this.Configuration.DesktopModule.BusinessControllerClass)) { // check if module implements IPortable interface, and user has Admin permissions if (this.Configuration.DesktopModule.IsPortable) { if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "EXPORT", this.Configuration)) { this._moduleGenericActions.Actions.Add( this.GetNextActionID(), Localization.GetString(ModuleActionType.ExportModule, Localization.GlobalResourceFile), ModuleActionType.ExportModule, string.Empty, "action_export.gif", this.NavigateUrl(this.PortalSettings.ActiveTab.TabID, "ExportModule", false, "moduleid=" + this.ModuleId, "ReturnURL=" + FilterUrl(request)), string.Empty, false, SecurityAccessLevel.View, true, false); } if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "IMPORT", this.Configuration)) { this._moduleGenericActions.Actions.Add( this.GetNextActionID(), Localization.GetString(ModuleActionType.ImportModule, Localization.GlobalResourceFile), ModuleActionType.ImportModule, string.Empty, "action_import.gif", this.NavigateUrl(this.PortalSettings.ActiveTab.TabID, "ImportModule", false, "moduleid=" + this.ModuleId, "ReturnURL=" + FilterUrl(request)), string.Empty, false, SecurityAccessLevel.View, true, false); } } if (this.Configuration.DesktopModule.IsSearchable && this.Configuration.DisplaySyndicate) { this.AddSyndicateAction(); } } // help module actions available to content editors and administrators const string permisisonList = "CONTENT,DELETE,EDIT,EXPORT,IMPORT,MANAGE"; if (ModulePermissionController.HasModulePermission(this.Configuration.ModulePermissions, permisisonList) && request.QueryString["ctl"] != "Help" && !Globals.IsAdminControl()) { this.AddHelpActions(); } // Add Print Action if (this.Configuration.DisplayPrint) { // print module action available to everyone this.AddPrintAction(); } if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Host, "MANAGE", this.Configuration) && !Globals.IsAdminControl()) { this._moduleGenericActions.Actions.Add( this.GetNextActionID(), Localization.GetString(ModuleActionType.ViewSource, Localization.GlobalResourceFile), ModuleActionType.ViewSource, string.Empty, "action_source.gif", this.NavigateUrl(this.TabId, "ViewSource", false, "ModuleId=" + this.ModuleId, "ctlid=" + this.Configuration.ModuleControlId, "ReturnURL=" + FilterUrl(request)), false, SecurityAccessLevel.Host, true, false); } if (!Globals.IsAdminControl() && ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "DELETE,MANAGE", this.Configuration)) { if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "DELETE", this.Configuration)) { // Check if this is the owner instance of a shared module. string confirmText = "confirm('" + ClientAPI.GetSafeJSString(Localization.GetString("DeleteModule.Confirm")) + "')"; if (!this.Configuration.IsShared) { var portal = PortalController.Instance.GetPortal(this.PortalSettings.PortalId); if (PortalGroupController.Instance.IsModuleShared(this.Configuration.ModuleID, portal)) { confirmText = "confirm('" + ClientAPI.GetSafeJSString(Localization.GetString("DeleteSharedModule.Confirm")) + "')"; } } this._moduleGenericActions.Actions.Add( this.GetNextActionID(), Localization.GetString(ModuleActionType.DeleteModule, Localization.GlobalResourceFile), ModuleActionType.DeleteModule, this.Configuration.ModuleID.ToString(), "action_delete.gif", string.Empty, confirmText, false, SecurityAccessLevel.View, true, false); } if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "MANAGE", this.Configuration)) { this._moduleGenericActions.Actions.Add( this.GetNextActionID(), Localization.GetString(ModuleActionType.ClearCache, Localization.GlobalResourceFile), ModuleActionType.ClearCache, this.Configuration.ModuleID.ToString(), "action_refresh.gif", string.Empty, false, SecurityAccessLevel.View, true, false); } if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "MANAGE", this.Configuration)) { // module movement this.AddMenuMoveActions(); } } if (this._moduleGenericActions.Actions.Count > 0) { this._actions.Add(this._moduleGenericActions); } if (this._moduleMoveActions != null && this._moduleMoveActions.Actions.Count > 0) { this._actions.Add(this._moduleMoveActions); } foreach (ModuleAction action in this._moduleGenericActions.Actions) { if (!UIUtilities.IsLegacyUI(this.ModuleId, action.ControlKey, this.PortalId) && action.Url.Contains("ctl")) { action.ClientScript = UrlUtils.PopUpUrl(action.Url, this._moduleControl as Control, this.PortalSettings, true, false); } } }
protected override void OnInit(EventArgs e) { base.OnInit(e); chkAllTabs.CheckedChanged += OnAllTabsCheckChanged; chkInheritPermissions.CheckedChanged += OnInheritPermissionsChanged; chkWebSlice.CheckedChanged += OnWebSliceCheckChanged; cboCacheProvider.TextChanged += OnCacheProviderIndexChanged; cmdDelete.Click += OnDeleteClick; cmdUpdate.Click += OnUpdateClick; dgOnTabs.NeedDataSource += OnPagesGridNeedDataSource; jQuery.RequestDnnPluginsRegistration(); //get ModuleId if ((Request.QueryString["ModuleId"] != null)) { _moduleId = Int32.Parse(Request.QueryString["ModuleId"]); } if (Module.ContentItemId == Null.NullInteger && Module.ModuleID != Null.NullInteger) { //This tab does not have a valid ContentItem ModuleController.Instance.CreateContentItem(Module); ModuleController.Instance.UpdateModule(Module); } //Verify that the current user has access to edit this module if (!ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Edit, "MANAGE", Module)) { if (!(IsSharedViewOnly() && TabPermissionController.CanAddContentToPage())) { Response.Redirect(Globals.AccessDeniedURL(), true); } } if (Module != null) { //get module TabModuleId = Module.TabModuleID; //get Settings Control ModuleControlInfo moduleControlInfo = ModuleControlController.GetModuleControlByControlKey("Settings", Module.ModuleDefID); if (moduleControlInfo != null) { _control = ControlUtilities.LoadControl <Control>(Page, moduleControlInfo.ControlSrc); var settingsControl = _control as ISettingsControl; if (settingsControl != null) { //Set ID var fileNameWithoutExtension = Path.GetFileNameWithoutExtension(moduleControlInfo.ControlSrc); if (fileNameWithoutExtension != null) { _control.ID = fileNameWithoutExtension.Replace('.', '-'); } //add module settings settingsControl.ModuleContext.Configuration = Module; hlSpecificSettings.Text = Localization.GetString("ControlTitle_settings", settingsControl.LocalResourceFile); if (String.IsNullOrEmpty(hlSpecificSettings.Text)) { hlSpecificSettings.Text = String.Format(Localization.GetString("ControlTitle_settings", LocalResourceFile), Module.DesktopModule.FriendlyName); } pnlSpecific.Controls.Add(_control); } } } }
private void LoadActions(HttpRequest Request) { _actions = new ModuleActionCollection(); int maxActionId = Null.NullInteger; IActionable actionable = _moduleControl as IActionable; if (actionable != null) { ModuleActionCollection ModuleActions = actionable.ModuleActions; foreach (ModuleAction action in ModuleActions) { if (ModulePermissionController.HasModuleAccess(action.Secure, "CONTENT", Configuration)) { if (String.IsNullOrEmpty(action.Icon)) { action.Icon = "edit.gif"; } if (action.ID > maxActionId) { maxActionId = action.ID; } _actions.Add(action); } } } int actionCount = GetActionsCount(_actions.Count, _actions); if (_nextActionId < maxActionId) { _nextActionId = maxActionId; } if (_nextActionId < actionCount) { _nextActionId = actionCount; } if (!string.IsNullOrEmpty(Configuration.DesktopModule.BusinessControllerClass)) { if (Configuration.DesktopModule.IsPortable) { if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "EXPORT", Configuration)) { _actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.ExportModule, Localization.GlobalResourceFile), "", "", "action_export.gif", Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "ExportModule", "moduleid=" + ModuleId.ToString()), "", false, SecurityAccessLevel.View, true, false); } if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "IMPORT", Configuration)) { _actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.ImportModule, Localization.GlobalResourceFile), "", "", "action_import.gif", Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "ImportModule", "moduleid=" + ModuleId.ToString()), "", false, SecurityAccessLevel.View, true, false); } } if (Configuration.DesktopModule.IsSearchable && Configuration.DisplaySyndicate) { AddSyndicateAction(); } } string permisisonList = "CONTENT,DELETE,EDIT,EXPORT,IMPORT,MANAGE"; if (Configuration.ModuleID > Null.NullInteger && ModulePermissionController.HasModulePermission(Configuration.ModulePermissions, permisisonList) && Request.QueryString["ctl"] != "Help") { AddHelpActions(); } if (Configuration.DisplayPrint) { AddPrintAction(); } if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Host, "MANAGE", Configuration)) { _actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.ViewSource, Localization.GlobalResourceFile), ModuleActionType.ViewSource, "", "action_source.gif", Globals.NavigateURL(TabId, "ViewSource", "ctlid=" + Configuration.ModuleControlId.ToString()), false, SecurityAccessLevel.Host, true, false); } if (!Globals.IsAdminControl() && ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "DELETE,MANAGE", Configuration)) { _actions.Add(GetNextActionID(), "~", "", "", "", "", false, SecurityAccessLevel.Anonymous, true, false); if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "MANAGE", Configuration)) { _actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.ModuleSettings, Localization.GlobalResourceFile), ModuleActionType.ModuleSettings, "", "action_settings.gif", Globals.NavigateURL(TabId, "Module", "ModuleId=" + ModuleId.ToString()), false, SecurityAccessLevel.Edit, true, false); } //if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "DELETE", Configuration)) //{ // _actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.DeleteModule, Localization.GlobalResourceFile), ModuleActionType.DeleteModule, Configuration.ModuleID.ToString(), "action_delete.gif", "", "confirm('" + CommonLibrary.UI.Utilities.ClientAPI.GetSafeJSString(Localization.GetString("DeleteModule.Confirm")) + "')", false, SecurityAccessLevel.View, true, false); //} if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "MANAGE", Configuration)) { _actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.ClearCache, Localization.GlobalResourceFile), ModuleActionType.ClearCache, Configuration.ModuleID.ToString(), "action_refresh.gif", "", false, SecurityAccessLevel.View, true, false); AddMenuMoveActions(); } } }
public static bool HasNecessaryPermission(SecurityAccessLevel AccessLevel, PortalSettings PortalSettings, ModuleInfo ModuleConfiguration, string UserName) { return(ModulePermissionController.HasModuleAccess(AccessLevel, "EDIT", ModuleConfiguration)); }
private bool UserIsModuleEditor() => Log.Intercept("UserIsModuleEditor", () => Module != null && ModulePermissionController .HasModuleAccess(SecurityAccessLevel.Edit, "", Module));
protected bool CanEdit() { return(ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Edit, "EDIT", ModuleConfiguration)); }
private bool ProcessSlaveModule() { ModuleController objModules = new ModuleController(); ModuleInfo objModule = null; ModuleInfo slaveModule = null; int moduleId = -1; string key = ""; bool bSuccess = true; if (Request.QueryString["mid"] != null) { Int32.TryParse(Request.QueryString["mid"], out moduleId); } if (Request.QueryString["ctl"] != null) { key = Request.QueryString["ctl"]; } if (Request.QueryString["moduleid"] != null && (key.ToLower() == "module" || key.ToLower() == "help")) { Int32.TryParse(Request.QueryString["moduleid"], out moduleId); } if (moduleId != -1) { objModule = objModules.GetModule(moduleId, PortalSettings.ActiveTab.TabID, false); if (objModule != null) { slaveModule = objModule.Clone(); } } if (slaveModule == null) { slaveModule = new ModuleInfo(); slaveModule.ModuleID = moduleId; slaveModule.ModuleDefID = -1; slaveModule.TabID = PortalSettings.ActiveTab.TabID; } if (Request.QueryString["moduleid"] != null && (key.ToLower() == "module" || key.ToLower() == "help")) { slaveModule.ModuleDefID = -1; } if (Request.QueryString["dnnprintmode"] != "true") { slaveModule.ModuleTitle = ""; } slaveModule.Header = ""; slaveModule.Footer = ""; slaveModule.StartDate = DateTime.MinValue; slaveModule.EndDate = DateTime.MaxValue; slaveModule.PaneName = Common.Globals.glbDefaultPane; slaveModule.Visibility = VisibilityState.None; slaveModule.Color = ""; slaveModule.Border = ""; slaveModule.DisplayTitle = true; slaveModule.DisplayPrint = false; slaveModule.DisplaySyndicate = false; slaveModule.ContainerSrc = PortalSettings.ActiveTab.ContainerSrc; if (string.IsNullOrEmpty(slaveModule.ContainerSrc)) { slaveModule.ContainerSrc = PortalSettings.DefaultPortalContainer; } slaveModule.ContainerSrc = SkinController.FormatSkinSrc(slaveModule.ContainerSrc, PortalSettings); slaveModule.ContainerPath = SkinController.FormatSkinPath(slaveModule.ContainerSrc); Pane pane = null; bool bFound = Panes.TryGetValue(Common.Globals.glbDefaultPane.ToLowerInvariant(), out pane); ModuleControlInfo objModuleControl = ModuleControlController.GetModuleControlByControlKey(key, slaveModule.ModuleDefID); if (objModuleControl != null) { slaveModule.ModuleControlId = objModuleControl.ModuleControlID; slaveModule.IconFile = objModuleControl.IconFile; if (ModulePermissionController.HasModuleAccess(slaveModule.ModuleControl.ControlType, Null.NullString, slaveModule)) { bSuccess = InjectModule(pane, slaveModule); } else { Response.Redirect(Common.Globals.AccessDeniedURL(MODULEACCESS_ERROR), true); } } return(bSuccess); }
/// ----------------------------------------------------------------------------- /// <summary> /// Recursive function to add module's actions to the DNNNodeCollection based off of passed in ModuleActions /// </summary> /// <param name="parentAction">Parent action</param> /// <param name="parentNode">Parent node</param> /// <param name="rootNode">Root Node.</param> /// <param name="actionControl">ActionControl to base actions off of</param> /// <param name="intDepth">How many levels deep should be populated</param> /// <remarks> /// </remarks> /// <history> /// [Jon Henning] 5/15/2006 Created /// </history> /// ----------------------------------------------------------------------------- private static void AddChildActions(ModuleAction parentAction, DNNNode parentNode, DNNNode rootNode, IActionControl actionControl, int intDepth) { //Add Menu Items foreach (ModuleAction action in parentAction.Actions) { bool isActionPending = IsActionPending(parentNode, rootNode, intDepth); if (action.Title == "~") { if (isActionPending == false) { //A title (text) of ~ denotes a break parentNode.DNNNodes.AddBreak(); } } else { //if action is visible and user has permission if (action.Visible && (action.Secure != SecurityAccessLevel.Anonymous || (!ModuleHost.IsViewMode(actionControl.ModuleControl.ModuleContext.Configuration, PortalSettings.Current)) && ModulePermissionController.HasModuleAccess(action.Secure, Null.NullString, actionControl.ModuleControl.ModuleContext.Configuration))) { if (isActionPending) { parentNode.HasNodes = true; } else { int i = parentNode.DNNNodes.Add(); DNNNode node = parentNode.DNNNodes[i]; node.ID = action.ID.ToString(); node.Key = action.ID.ToString(); node.Text = action.Title; //no longer including SPACE in generic node collection, each control must handle how they want to display if (string.IsNullOrEmpty(action.ClientScript) && string.IsNullOrEmpty(action.Url) && string.IsNullOrEmpty(action.CommandArgument)) { node.Enabled = false; } else if (!string.IsNullOrEmpty(action.ClientScript)) { node.JSFunction = action.ClientScript; node.ClickAction = eClickAction.None; } else { node.NavigateURL = action.Url; if (action.UseActionEvent == false && !String.IsNullOrEmpty(node.NavigateURL)) { node.ClickAction = eClickAction.Navigate; if (action.NewWindow) { node.Target = "_blank"; } } else { node.ClickAction = eClickAction.PostBack; } } node.Image = action.Icon; if (action.HasChildren()) //if action has children then call function recursively { AddChildActions(action, node, rootNode, actionControl, intDepth); } } } } } }
/// ----------------------------------------------------------------------------- /// <summary> /// LoadActions loads the Actions collections /// </summary> /// <remarks> /// </remarks> /// <history> /// [cnurse] 01/19/2006 created /// </history> /// ----------------------------------------------------------------------------- private void LoadActions(HttpRequest request) { _actions = new ModuleActionCollection(); _moduleGenericActions = new ModuleAction(GetNextActionID(), Localization.GetString("ModuleGenericActions.Action", Localization.GlobalResourceFile), string.Empty, string.Empty, string.Empty); int maxActionId = Null.NullInteger; //check if module Implements Entities.Modules.IActionable interface var actionable = _moduleControl as IActionable; if (actionable != null) { _moduleSpecificActions = new ModuleAction(GetNextActionID(), Localization.GetString("ModuleSpecificActions.Action", Localization.GlobalResourceFile), string.Empty, string.Empty, string.Empty); ModuleActionCollection moduleActions = actionable.ModuleActions; foreach (ModuleAction action in moduleActions) { if (ModulePermissionController.HasModuleAccess(action.Secure, "CONTENT", Configuration)) { if (String.IsNullOrEmpty(action.Icon)) { action.Icon = "edit.gif"; } if (action.ID > maxActionId) { maxActionId = action.ID; } _moduleSpecificActions.Actions.Add(action); if (!UIUtilities.IsLegacyUI(ModuleId, action.ControlKey, PortalId) && action.Url.Contains("ctl")) { action.ClientScript = UrlUtils.PopUpUrl(action.Url, _moduleControl as Control, PortalSettings, true, false); } } } if (_moduleSpecificActions.Actions.Count > 0) { _actions.Add(_moduleSpecificActions); } } //Make sure the Next Action Id counter is correct int actionCount = GetActionsCount(_actions.Count, _actions); if (_nextActionId < maxActionId) { _nextActionId = maxActionId; } if (_nextActionId < actionCount) { _nextActionId = actionCount; } if (!string.IsNullOrEmpty(Configuration.DesktopModule.BusinessControllerClass)) { //check if module implements IPortable interface, and user has Admin permissions if (Configuration.DesktopModule.IsPortable) { if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "EXPORT", Configuration)) { _moduleGenericActions.Actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.ExportModule, Localization.GlobalResourceFile), "", "", "action_export.gif", NavigateUrl(PortalSettings.ActiveTab.TabID, "ExportModule", false, "moduleid=" + ModuleId), "", false, SecurityAccessLevel.View, true, false); } if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "IMPORT", Configuration)) { _moduleGenericActions.Actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.ImportModule, Localization.GlobalResourceFile), "", "", "action_import.gif", NavigateUrl(PortalSettings.ActiveTab.TabID, "ImportModule", false, "moduleid=" + ModuleId), "", false, SecurityAccessLevel.View, true, false); } } if (Configuration.DesktopModule.IsSearchable && Configuration.DisplaySyndicate) { AddSyndicateAction(); } } //help module actions available to content editors and administrators const string permisisonList = "CONTENT,DELETE,EDIT,EXPORT,IMPORT,MANAGE"; if (Configuration.ModuleID > Null.NullInteger && ModulePermissionController.HasModulePermission(Configuration.ModulePermissions, permisisonList) && request.QueryString["ctl"] != "Help") { AddHelpActions(); } //Add Print Action if (Configuration.DisplayPrint) { //print module action available to everyone AddPrintAction(); } if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Host, "MANAGE", Configuration)) { _moduleGenericActions.Actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.ViewSource, Localization.GlobalResourceFile), ModuleActionType.ViewSource, "", "action_source.gif", NavigateUrl(TabId, "ViewSource", false, "ctlid=" + Configuration.ModuleControlId), false, SecurityAccessLevel.Host, true, false); } if (!Globals.IsAdminControl() && ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "DELETE,MANAGE", Configuration)) { if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "MANAGE", Configuration)) { _moduleGenericActions.Actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.ModuleSettings, Localization.GlobalResourceFile), ModuleActionType.ModuleSettings, "", "action_settings.gif", NavigateUrl(TabId, "Module", false, "ModuleId=" + ModuleId), false, SecurityAccessLevel.Edit, true, false); } if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "DELETE", Configuration)) { _moduleGenericActions.Actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.DeleteModule, Localization.GlobalResourceFile), ModuleActionType.DeleteModule, Configuration.ModuleID.ToString(), "action_delete.gif", "", "confirm('" + ClientAPI.GetSafeJSString(Localization.GetString("DeleteModule.Confirm")) + "')", false, SecurityAccessLevel.View, true, false); } if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "MANAGE", Configuration)) { _moduleGenericActions.Actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.ClearCache, Localization.GlobalResourceFile), ModuleActionType.ClearCache, Configuration.ModuleID.ToString(), "action_refresh.gif", "", false, SecurityAccessLevel.View, true, false); } if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Admin, "MANAGE", Configuration)) { //module movement AddMenuMoveActions(); } } if (_moduleGenericActions.Actions.Count > 0) { _actions.Add(_moduleGenericActions); } if (_moduleMoveActions != null && _moduleMoveActions.Actions.Count > 0) { _actions.Add(_moduleMoveActions); } foreach (ModuleAction action in _moduleGenericActions.Actions) { if (!UIUtilities.IsLegacyUI(ModuleId, action.ControlKey, PortalId) && action.Url.Contains("ctl")) { action.ClientScript = UrlUtils.PopUpUrl(action.Url, _moduleControl as Control, PortalSettings, true, false); } } }
protected override void OnInit(EventArgs e) { base.OnInit(e); try { chkAllTabs.CheckedChanged += OnAllTabsCheckChanged; chkInheritPermissions.CheckedChanged += OnInheritPermissionsChanged; chkWebSlice.CheckedChanged += OnWebSliceCheckChanged; cboCacheProvider.TextChanged += OnCacheProviderIndexChanged; cmdDelete.Click += OnDeleteClick; cmdUpdate.Click += OnUpdateClick; JavaScript.RequestRegistration(CommonJs.DnnPlugins); //get ModuleId if ((Request.QueryString["ModuleId"] != null)) { _moduleId = Int32.Parse(Request.QueryString["ModuleId"]); } if (Module.ContentItemId == Null.NullInteger && Module.ModuleID != Null.NullInteger) { //This tab does not have a valid ContentItem ModuleController.Instance.CreateContentItem(Module); ModuleController.Instance.UpdateModule(Module); } //Verify that the current user has access to edit this module if (!ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Edit, "MANAGE", Module)) { if (!(IsSharedViewOnly() && TabPermissionController.CanAddContentToPage())) { Response.Redirect(Globals.AccessDeniedURL(), true); } } if (Module != null) { //get module TabModuleId = Module.TabModuleID; //get Settings Control ModuleControlInfo moduleControlInfo = ModuleControlController.GetModuleControlByControlKey("Settings", Module.ModuleDefID); if (moduleControlInfo != null) { _control = ModuleControlFactory.LoadSettingsControl(Page, Module, moduleControlInfo.ControlSrc); var settingsControl = _control as ISettingsControl; if (settingsControl != null) { hlSpecificSettings.Text = Localization.GetString("ControlTitle_settings", settingsControl.LocalResourceFile); if (String.IsNullOrEmpty(hlSpecificSettings.Text)) { hlSpecificSettings.Text = String.Format(Localization.GetString("ControlTitle_settings", LocalResourceFile), Module.DesktopModule.FriendlyName); } pnlSpecific.Controls.Add(_control); } } } } catch (Exception err) { Exceptions.ProcessModuleLoadException(this, err); } }
private bool UserIsModuleEditor() => Module != null && ModulePermissionController .HasModuleAccess(SecurityAccessLevel.Edit, "" /*"EDIT"*/, Module);