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.0Tab Permissions Cache refreshTab Permissions Cache refresh
Previous
 
Next
New Post
11/10/2006 4:37 PM
 

I am using the DNN objects to programatically create and manage Users, Roles, and Tab Permissions.  My problem is that when I create a user, I'd like to immediately be able to Log on as that user to verify that the Tab Permissions are correctly applied.

However, the permissions a being cached, so that if I change them they aren't immediately updated.  I believe that I'm refreshing the TabPermissions cache after I modify permissions for a role, but it doesn't seem to be working.

TIA.

Here's code:

Private Sub AddTabPermissions(ByVal TabID As Integer, ByVal RoleID As Integer)

Dim oTabPermissionController As New TabPermissionController

Dim oTabPermissionInfo As TabPermissionInfo

'if permission doesn't already exist, add it

Dim i As Integer = 0

Dim bAddPermission As Boolean = True

Dim arrTabPermissions As ArrayList = oTabPermissionController.GetTabPermissionsByTabID(TabID)

For i = 0 To arrTabPermissions.Count - 1

oTabPermissionInfo = CType(arrTabPermissions.Item(i), TabPermissionInfo)

If oTabPermissionInfo.RoleID = RoleID Then

bAddPermission = False

Exit For

End If

Next

If bAddPermission Then

'Add View Permission

oTabPermissionInfo = New TabPermissionInfo

oTabPermissionInfo.TabID = TabID

oTabPermissionInfo.RoleID = RoleID

oTabPermissionInfo.PermissionID = 3

oTabPermissionInfo.AllowAccess = True

oTabPermissionController.AddTabPermission(oTabPermissionInfo)

'Check for parent and add parent permission

Dim oTabController As New TabController

Dim oTabInfo As TabInfo = oTabController.GetTab(TabID)

If oTabInfo.ParentId > 0 Then

AddTabPermissions(oTabInfo.ParentId, RoleID)

End If

End If

'Tab Permissions are Cached, so the Cache must be cleared before getting permissions

DataCache.RemoveCache("GetTabPermissionsByPortal" & PortalID.ToString)

End Sub

 

 

 

 
New Post
12/19/2006 4:39 PM
 
I am having a similar sort of issue.
Did you manage to find a solution to this problem?
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Tab Permissions Cache refreshTab Permissions Cache refresh


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