Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AspDotNetStoreFront
  Ads  
 


  Sponsors  

Meet Our Sponsors

MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Call UpdateUserRole from AddUserRole
Previous Previous
 
Next Next
New Post 5/14/2006 6:52 PM
User is offline Michael Freidgeim
89 posts
geekswithblogs.net/mnf/
10th Ranked


Call UpdateUserRole from AddUserRole 
Modified By Michael Freidgeim  on 5/15/2006 10:12: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 6:09 AM
User is offline cathal connolly
2748 posts
www.cathal.co.uk
5th Ranked










Re: Call UpdateUserRole from AddUserRole 

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

 
New Post 5/15/2006 11:33 AM
User is offline Charles Nurse
2887 posts
5th Ranked










Re: Call UpdateUserRole from AddUserRole 
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
DotNetNuke Trustee,
Senior Architect, DotNetNuke Coporation
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
See my Blog for Articles on .NET, DNN and Module Development

View my Blog
 
New Post 5/15/2006 8:12 PM
User is offline Michael Freidgeim
89 posts
geekswithblogs.net/mnf/
10th Ranked


Re: Call UpdateUserRole from AddUserRole 
Modified By Michael Freidgeim  on 5/30/2006 2:40:51 AM)

 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 Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Call UpdateUserRole from AddUserRole
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Get Smarter Mail, SmarterStats, SmarterTickets
Windows mail server, web log analytics, and customer service management software - Free Editions Available!
www.smartertools.com
DotNetNuke Modules, Skins, Training and Consulting
If you want DotNetNuke done right then look no further. Developed Solutions provides module development, skin design, user and developer training and consulting. Based in Adelaide, Australia, we offer our services worldwide.
www.developedsolutions.com.au
Venexus, Inc.
Need custom a custom DotNetNuke module? From module planning to deployment, including training and support, Venexus developers deliver end-to-end web solutions on time and on budget.
www.venexus.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP