.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old February 18th, 2002, 02:14 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
How does "IsInRole" really works?

Originally posted by : Shell (shell_wang@hotmail.com)Is there any requirement about the table which store the information about the roles and users? Otherwise, how can the IsInRole method get to know which table it should look into to check the user's role? Or there is some class to implement some class?thanks!

Reply With Quote
  #2  
Old February 20th, 2002, 02:53 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Kerry Whelan (whelan_kerry@hotmail.com)</b></i><br /><br />Set the GenericPrincipal with a string array of groups that the user belongs to, from your table.<br /><br />IsInRole takes a string role and if the current GenericPrincipal is a member of that role it returns "TRUE".<br /><br />Hope this helps,<br /><br />Kerry

Reply With Quote
  #3  
Old February 20th, 2002, 12:00 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : shell (shell_wang@hotmail.com)</b></i><br /><br />But the .NET still need a way to decide whether this user belongs to this string role. That means it has to have a table in DB or something else to store the relationship between user and role. What table does it use? <br /><br />------------<br />Kerry Whelan at 2/20/2002 12:53:56 AM<br /><br /><br />Set the GenericPrincipal with a string array of groups that the user belongs to, from your table.<br /><br />IsInRole takes a string role and if the current GenericPrincipal is a member of that role it returns "TRUE".<br /><br />Hope this helps,<br /><br />Kerry

Reply With Quote
  #4  
Old February 21st, 2002, 04:06 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : </b></i><br />If you are using GenericPrincipals you tell .NET what groups the user belongs to. This is done with the string array. You set up the roles in the principal and then question the role in the IsInRole.<br /><br />If you want to use Windows Roles you can use IsInRole(WindowsBuiltInRole.Administrator)<br /><br />Kerry<br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > How does "IsInRole" really works?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway