Role

Jan 21, 2009 at 9:34 AM
Hi

I have a strange problem and can't find out, why its not working.

I have page with a checkbox. When submit the remove roles doesn't work.

If
txtCompanyAdmin.Checked = False Then
    Roles.RemoveUserFromRole(SelectedUserName, "CompanyAdmin")
Else
    Roles.AddUserToRole(SelectedUserName, "CompanyAdmin")
End If

The addUserToRole works fine, but removeUserFromRole doesn't. No errors at all. If I do it within N2 usermangement, I can remove it from the role.
Has tried to put it in the load section with same result             (Roles.RemoveUserFromRole(SelectedUserName, "CompanyAdmin"))


Does anybody have an idea?

 

Jan 21, 2009 at 1:15 PM
See my submitted Issue post here: http://www.codeplex.com/n2/WorkItem/View.aspx?WorkItemId=20465  That fixed it for me.
Jan 21, 2009 at 5:38 PM
Thanks jemerick

That also did the trick for me.

Hope that this will be fixet in the source.