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.0Help needed retrieving list of users with module permissionsHelp needed retrieving list of users with module permissions
Previous
 
Next
New Post
7/20/2007 4:26 PM
 

I would like to list all the users who have specific rights to a custom module.
My first thought is to create a SQL procedure and pull the data directly from the "ModulePermission" table. This table could be changed in the future so I would prefer to use existing DNN controls if they exist.

Some of the functions in "DotNetNuke.Security.Permissions.ModulePermissionController" look promising but I can't find any information on what these functions return.

Any help is appreciated.

 
New Post
7/20/2007 4:55 PM
 

Are you looking for a listing of all users with edit permissions to the module?


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
7/20/2007 5:39 PM
 

Actually I am trying to retrieve all users with a custom permission. Custom permissions are discussed here:

http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryID/1052/Default.aspx

But if you know of a way to list users with view or edit permissions, that information would be appreciated.

 

 
New Post
7/20/2007 7:58 PM
 

You can use third party module from http://components.init.si/ this is db GUI for dnn and almost all dnn data is stored in db. I use this module for:

- module and page permissions viewer for users and roles
- siteLogViewer (original is slow, cannot use multiple filters, sort etc)
- evetLogViewer (original is slow, cannot use multiple filters, sort etc)
- forum search (also for forum aggregate for multiple forums used on sub-portals etc and original search is slow also)
- user listing
- lot of other queries using dnn data and numerous other projects :-)

Here are example of module settings for listing permissions: http://components.init.si/OnlineHelp/IndooGridmoduleforDNN/SamplescriptListrolesandpermissions/tabid/190/Default.aspx (I'm not sure if works with last DNN version, but probably does - if there are some changes in dnn database structure in last versions of dnn I will update settings)

Module is not free but you can try it for free and see if meets your requirements.

Kind regards,

Primoz

EDIT: I did check example - is only for all modules and roles permissions - but you can set module to show users and permissions or anything else that is stored in DNN database

 
New Post
7/20/2007 10:40 PM
 

I recently had to do this in a custom module for which a custom permission key "MODERATE" had been defined. Here's a snippet of code which fills an array list with ListItem objects containing the username/userID of those with "MODERATE" permission on the module:

Dim arrAvailable As New ArrayList
 Dim mpc As New DotNetNuke.Security.Permissions.ModulePermissionController
 Dim rc As New DotNetNuke.Security.Roles.RoleController
 Dim mp As DotNetNuke.Security.Permissions.ModulePermissionInfo
 For Each mp In mpc.GetModulePermissionsCollectionByModuleID(ModuleId, TabId)
       If mp.PermissionCode = Permission.Code And mp.PermissionKey = Permission.ModerateKey Then
              Dim RoleName As String = mp.RoleName
              For Each ui As Entities.Users.UserInfo In rc.GetUsersByRoleName(PortalId, RoleName)
                     Dim li As New ListItem(ui.DisplayName, ui.UserID)
                     If Not arrAvailable.Contains(li) Then arrAvailable.Add(li)
              Next
       End If
 Next

In the above code, Permission.Code and Permission.ModerateKey are string constants, "WESNet_EPrayer" and "MODERATE" representing the defined custom PermissionCode and PermissionKey. An ArrayList of ListItem objects were used because in the following code those already actively assigned as Moderators are removed from the ArrayList then those remaining are used to populate a DropDownList of moderators still available to be assigned.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Help needed retrieving list of users with module permissionsHelp needed retrieving list of users with module permissions


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