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.0Call UpdateUserRole from AddUserRoleCall UpdateUserRole from AddUserRole
Previous
 
Next
New Post
5/14/2006 8:52 PM
 
I've noticed that in DotNetNuke\Library\Components\Security\Roles\RoleController.vb Sub AddUserRole has the following code:

            Dim objUserRole As UserRoleInfo = GetUserRole(PortalID, UserId, RoleId)

            If objUserRole Is Nothing Then

               'Code to AddUserRole omitted for brevity

            Else

                DataProvider.Instance().UpdateUserRole(objUserRole.UserRoleID, ExpiryDate)

            End If
Note that UpdateUserRole doesn't have UserId parameter and sets ExpiryDate for all users  in specified role.
Is it a bug?


Michael Freidgeim http://geekswithblogs.net/mnf
 
New Post
5/15/2006 8:09 AM
 

It certainly looks a bit odd, I don't that area particularly well, so I'll flag it to Charles who's been doing a lot of work refactoring the entire user and roles area, and see what he thinks. You may wish to record it in the public issuelog so it doesn't get lost and you can trace it.

Thanks,

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
5/15/2006 1:33 PM
 
There have been significant changes to this area in 3.3/4.1.

I do not think it was a bug anyway, as the contract for the API method requires the user to pass the Expiry date, so it is up to the calling method to ensure that this value is valid.

With regard to the User Id, this value is also not neccessary, as the UserRole is uniquely identified by the UserRoleId.

Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
New Post
5/15/2006 10:12 PM
 

cnurse wrote
With regard to the User Id, this value is also not neccessary, as the UserRole is uniquely identified by the UserRoleId.

The function AddUserRole  assignes a user to a specified role in dnn_UserRoles and aspnet_UsersInRoles tables.

DataProvider.Instance().UpdateUserRole  sets ExpiryDate for all users  in specified role.

Note that both calls do NOT work with Roles tables( dnn_Roles or aspnet_Roles).

If it is not bug, there are two different business functions implemented in one RoleController.AddUserRole method. And the second function is not expected based on function name.

I hope that it is fixed by changes in 3.3/4.1



 

 

 


Michael Freidgeim http://geekswithblogs.net/mnf
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Call UpdateUserRole from AddUserRoleCall UpdateUserRole from AddUserRole


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