Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module Settings and actions.Add methodModule Settings and actions.Add method
Previous
 
Next
New Post
1/27/2009 11:23 AM
 

Hello,

Am I correct in my understanding that only Hosts/Administrators and user groups who have been assigned page edit rights can see a module's 'Settings' menu item (i.e. simply assigning a user group module edit rights without page edit rights is not sufficient for them to see a modules 'Settings' menu item)?

I have a number of custom module settings that I wish to be able to set at runtime. As per articles elsewhere I created a settings control that appears at the bottom of the Module Settings page which works fine for Administrators. The thing is I'd also like certain other authorized users to be able to update these custom settings, but not have access to all the other standard module settings (e.g. those that control module permissions and appearance etc.). I was hoping to reuse the settings control that I developed. Here's how I've proceeded but I have a couple of questions.

I created a custom permission that appears on the Module Settings page alongside the existing 'View Module' and 'Edit Module' permissions (e.g. 'Edit Custom Settings'). Administrators use this to set which user groups have permissions to edit my custom module settings.

I then added an 'Edit Custom Settings' menu item to my module (using ModuleActions) which I intend only to display to users with 'Edit Custom Settings' permissions. The menu item is supposed to redirect the user to a page into which the Settings control would be loaded (e.g. using either the EditURL or NavigateURL method). However I'm running into a couple of problems from my lack of understanding of the actions.Add method - particularly the [CmdName], [SecurityAccessLevel] and [Visible] parameters:

actions.Add(GetNextActionID, "Edit Custom Settings", [CmdName]?, "", "", EditUrl("Settings"), False, [SecurityAccessLevel]?, [Visible]?, False)

From a bit of digging around the CmdName parameter is where you're supposed to place the name of a command if you want your menu item to call client-side code (JavaScript) - however this also seems to effect whether or not the menu item appears as a button in the module footer? What are the implications of setting it to one value over another?

What shoud the SecurityAccessLevel parameter be set to is - I note that there are DotNetNuke.Security.SecurityAccessLevel.View and DotNetNuke.Security.SecurityAccessLevel.Edit values but I'm not sure how they relate to my situation but I guess they effect if/how the menu item might appear? What is the most appropraite setting?

Finally how should the value of the Visible parmeter be determined? Should I check whether or not the current user has "Edit Custom Settings" permissions and set the Visible to be true if the have (otherwise set it to false)?

Thanks,

Norman

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module Settings and actions.Add methodModule Settings and actions.Add method


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out