473,836 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Imperative Role-Based Security

Hi group
How can I find out the role of user in my local computer using imperative
role-based security?
Regards,
Nov 17 '05 #1
1 1306
Jefe,

You can't get a list of roles for a principal (for example, the one
returned through the static CurrentPrincipa l property on the Thread class).
Rather, you pass the name of the role to the IPrincipal's implementation of
IsInRole, and if it returns true, then the user is in the role.

It's up to the application context to establish the roles (depending on
the kind of principal you are using).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Jefe" <Je**@discussio ns.microsoft.co m> wrote in message
news:87******** *************** ***********@mic rosoft.com...
Hi group
How can I find out the role of user in my local computer using imperative
role-based security?
Regards,

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7186
by: tracy | last post by:
hi, just wonder, can we copy a role then add some new priviledges to the new role. hm.. i means, example; now i have a role named role_a. Then I copy role_a to create role_b. After I created role_b from role_a, i would like to revoke some privileges in role_b without affecting role_a. Can I and how to write the script? regards, tracy
2
8578
by: Ted | last post by:
How do I grant all privileges for a schema that has a large number of existing tables, procedures, functions, etc to a newly created role, without having to issue a grant statement for each object and each privilege? I want the role to have all of the rights of the schema owner. Is there any kind of blanket granting of all privileges to a role?
9
1336
by: Xah Lee | last post by:
in coding Python yesterday, i was quite stung by the fact that lists appened to another list goes by as some so-called "reference". e.g. t=range(5) n=range(3) n='m' t.append(n) n='h' t.append(n) print t
8
4904
by: Mark White | last post by:
Hey everyone I'm having a great deal of problems finding this information through google and yahoo, so I turn to you on this. I have a Windows app running on XP. I am able to caputre the user's Name property in the WindowsPrincipal's IIdentity interface. Where can I find the role that the user is assigned for the current login? I only want the one role which is assigned for the current user, not all of
0
2088
by: ferherra | last post by:
Hi, Hope someone can help... I databind my gridview (asp.net 2.0) like this: GridView1.DataSource = Membership.GetAllUsers(); (MembershipUserCollection) GridView1.DataBind(); In the GridView1_RowDataBound eventhandler I'm getting the user role for each user (each user will only have and
4
3532
by: cybertoast | last post by:
i seem to have some misunderstanding about how roles work in sql server 2005. i see that i can add a role to a database (dbname->->properties->permissions->. THis allows me to add either users or roles. Users can be added programmatically using sp_grantdbaccess @username, but this does not allow for addition of roles to access the database (i.e., sp_grantdbaccess @rolename does not work). Is there some other command that is used to add...
4
1631
by: Sebastian Fey | last post by:
Hi, i have to design a program written in an imperative language. I ve done the anaylysis part in UML, but how do i proceed? Core of the program is a data structure that looks like this: ----------- --------
1
11209
by: Cconfused | last post by:
Hi there, I was wondering if anyone could explain to me the difference between an imperative program, and an OO program? I am fully aware of the languages which support these (older languages for imperative, and for example Java for OO), and although I understand the basic concepts of OO - classes and objects, I would just like some clarification of the difference between OO and imperative. At present, I am presuming that an imperative...
5
983
by: Jean-Paul Calderone | last post by:
On Wed, 16 Apr 2008 13:18:22 -0700 (PDT), skanemupp@yahoo.se wrote: Function calls (recursive or otherwise) are more expensive than for loops, so the version that replaces recursion with a loop is faster. Any function can be implemented without recursion, although it isn't always easy or fun. Jean-Paul
2
1890
by: Anthony Smith | last post by:
I have a user object that is set when a user logs in. There are also permissions that I get about the user from a web service. Currently I take the results from those web services and store them as XML in the user object so I can parse it when I need to look at them. I wanted to turn the xml permissions into ROle objects, but does that mean that my User class needs to make reference to the Role class? User class example class User{
0
9813
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9665
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10248
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7782
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6976
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5645
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5817
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4446
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3108
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.