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/21/2007 10:45 AM
 

Thank you for the responses.

Primoz,
Indoogrid is overkill for this project but may be perfect for another project. Thank you for that link.

Bill,
Seeing how you used "GetModulePermissionsCollectionByModuleID" gives me the answer I needed. It is clear to me now that the UserID and UserName fields included in this collection are related to the new single user permission feature and not a listing of all users with permissions.

With that in mind, we will have to check for individual user permissions if we want to add them to the list.

   If mp.PermissionCode = Permission.Code And mp.PermissionKey = Permission.ModerateKey Then
      Dim RoleName As String = mp.RoleName
      IF NOT IsDBNull(RoleName) Then
     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
      Else 'If Role is Null then this must be a user permission
        Dim li As New ListItem(mp.UserName, mp.UserID)
        If Not arrAvailable.Contains(li) Then arrAvailable.Add(li)   
      End IF
   End If

 

 

 
New Post
7/21/2007 9:06 PM
 

DSlage,

That's a good addition to the code to handle the new individual user permissions. The code I had posted was written just before this feature was added to the core.  I'll have to add it to this modules next upgrade. Thanks!


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
 
New Post
7/24/2007 10:23 AM
 

"IF NOT IsDBNull(RoleName) Then" didn't work. For whatever reason they return a negative RoleID for the user permission records.

Replace the above statement with "If mp.RoleID > 0 Then".

 
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