473,396 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

plz advise!! user rights..

I have an application in C# and I want to assign rights based on the user
login. I have users table in the database and I wnat to know what is the
best way to manage the user rights?

Jul 13 '07 #1
2 1525
Jassim Rahma wrote:
I have an application in C# and I want to assign rights based on the user
login. I have users table in the database and I wnat to know what is the
best way to manage the user rights?
Hi,

There are generally two basic approaches to this, capabilities and
access-control. Depending on your application, you need to decide which
way to go about this. Both of these approaches are inherently the same;
it's a way of deciding if an operation (i.e. performed by a user) is
allowed. But they differ on how the users rights are mapped to
resources/operations.

Using capabilities, when an operation is performed the program will check
the *user* and see if he has rights to perform the operation. Using
access-control, the program will check the *resource* and see if the user
has access.

So, capabilities is a list of rights a user has:

U1: {(R1,read), (R1,write), (R2,read)}
U2: {(R1,read)}
U3: {(R2,delete),(R3,read), (R3,write)}

And access control is a list of users who have access to a resource:

R1: {(U1, read), (U1, write), (U2, read)}
R2: {(U1,read), (U3,delete)}
R3: {(U3,read), (U3,write)}

Once you've decided how you want to approach this, the database relations
generally come naturally.

Once you have the relations, you can easily query the database based on how
you want to check permissions.
--
Tom Spink
University of Edinburgh
Jul 14 '07 #2
PS

"Jassim Rahma" <jr****@hotmail.comwrote in message
news:C8**********************************@microsof t.com...
>I have an application in C# and I want to assign rights based on the user
login. I have users table in the database and I wnat to know what is the
best way to manage the user rights?
In addition to what Tom posted the relationship between a user and the
authorization can be a direct relationship or you can define roles and
assign the users to the particular roles. If there will be a large number of
users then it is likely that the requirements may be expressed more as
"Standard Users can not delete XYZ" rather than "John can not delete XYZ".
The role itself has the authorizations. There are also advantages in doing
this if the user is to have a mixed bag of authorizations based on the
context, i.e. on Active accounts they are a Power User, on Inactive Accounts
they are a Super User.

PS
Jul 14 '07 #3

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

Similar topics

0
by: Mark1 | last post by:
Hi, as I did not find a group for MySQL I try my luck here. Plz tell me, if there is a better cathegory for MySQL... I´ve got several MySQL Databases running on a Linux 8.1 Server. User...
1
by: simo sentissi | last post by:
Hello I have a vb.net app from where I send emails using the smtp .net class. I was developping it under my user rights (admin), but when I run it as a normal user it faces an error of the sort...
12
by: Quentin Huo | last post by:
Hi: I am working in win 2003 and ASP.NET. I tried to modify the user rights from an ASPX (writen in C#) page through running xcacls. But failed. What I did is: Process myProcess = new...
5
by: Andy | last post by:
Hi What user rights are necessary to run Vb.net 2005? I've tried to have only ordinary user rights when I start VB.net the first time and get some strange messages. /A.
0
by: poli | last post by:
Hi, I have a urgent problem. I want to end a running application before I start another one (in c# code). I see that all these function GetProcesses() ,GetProcessesByName(), run only if I have...
0
by: Keita | last post by:
Hi everyone. I'm using a socket-based application for Windows platforms (using winsock). Everything works fine when trying to connect in Administrator mode, but when I'm in User mode no communication...
1
by: nabilj45 | last post by:
Does anyone have a query that will list all the users and user rights for a sqlserver database. Thanks so much!
1
by: yellowblueyellow | last post by:
Hey ,, I wanted to List user rights assignment programmatically using c#.. the function should list the privilege and the user it has been granted to. I think it can be done using PInvoke . Is...
1
by: Jason7899 | last post by:
hi, i need configure user rights in windows server 2008 i have the groups already defined by default but now i want creat a group and configure all permisions on that group where can i find that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.