Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Check priv's

Author  Topic 

StylizIT
Starting Member

12 Posts

Posted - 2004-02-05 : 05:30:20
Hi all,

I have an webapplication and I want to let the app check the privileges of the user logged in. with that info the app must show some functions of the system and hide others.

I want to know if somenthing like this is possible and how I can do It

PS.
MySQL has a table with users, tables and the privileges those users had on each table and you could just use a select statement to show them.
(Is something like this also possible in SQL server 2k)

thnx in advance

Perfection is just an Illusion but I want to get as close as possible to that Illusion

StylizIT
Starting Member

12 Posts

Posted - 2004-02-05 : 07:11:41
If Somebody knows that this is impossible, plz let me know

Perfection is just an Illusion but I want to get as close as possible to that Illusion
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-02-05 : 07:14:42
Look in Books Online under sp_helprotect. That should get you started. Also check the PERMISSIONS() function.
Go to Top of Page

StylizIT
Starting Member

12 Posts

Posted - 2004-02-05 : 08:01:50
quote:
Originally posted by robvolk

Look in Books Online under sp_helprotect. That should get you started. Also check the PERMISSIONS() function.



Thanx Robvolk,

Now I can do something useful (at last), It was a golden tip
thnx again

Perfection is just an Illusion but I want to get as close as possible to that Illusion
Go to Top of Page

StylizIT
Starting Member

12 Posts

Posted - 2004-02-06 : 05:28:36
Hi,
I need some help with logical thinking.

I can retrieve the permissions allowed to a user or role. but if I grant a role an action let's say delete and grant an user to that role I can't retrieve the permission to delete for that user.

What I want to do is to use an own Sproc and sp_helprotect and sp_helpuser to put the retrieved permissions in a table and check the members of a particilar role. then I want to let the aplication get the retrieved information from that table.
because I can't get the output value of a sproc in my application (asp.net), I think this is the best option.

But I don't know if this is wise or not to do it like this.
So I ask if somebody knows a better way.

PS.The only thing I can get from the sproc to my app is the Rows affected and the result of a select query

Perfection is just an Illusion but I want to get as close as possible to that Illusion
Go to Top of Page
   

- Advertisement -