Hi,
I have a custom module that adds items to an action module using the IActionable interface. Relevant code excerpt below. I want one user role (Administrator) to be able to access all the menu options, and another role, which has Edit access to the module, only to be able to access one option.
I thought that by setting the Security argument to SecurityAccessLevel.Edit for the option available to both roles, and SecurityAccessLevel.Admin for the Admin only role, I'd get what I wanted. However, it seems that the two values give the same access right to both roles.
Is there a difference between the SecurityAccessLevel.Admin and SecurityAccessLevel.Edit values in DNN5.2, or has the distinction been removed along with the changes to Admin modules? Is there any other way I can achieve what I want to do here?
public ModuleActionCollection ModuleActions
{
get
{
ModuleActionCollection Actions = new ModuleActionCollection();
Actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.EditContent, this.LocalResourceFile),
ModuleActionType.AddContent, string.Empty, string.Empty, EditUrl(), false, DotNetNuke.Security.SecurityAccessLevel.Edit,
true, false);
Actions.Add(GetNextActionID(), Localization.GetString(LocalModuleActionType.EditClient, this.LocalResourceFile),
LocalModuleActionType.EditClient, string.Empty, "edit.gif", EditUrl("Clients"), false, DotNetNuke.Security.SecurityAccessLevel.Admin,
true, false);
Actions.Add(GetNextActionID(), Localization.GetString(LocalModuleActionType.EditService, this.LocalResourceFile),
LocalModuleActionType.EditService, string.Empty, "edit.gif", EditUrl("Services"), false, DotNetNuke.Security.SecurityAccessLevel.Admin,
true, false);
return Actions;
}
}