开发者

Getting Database Access Level In C#

I have a sql 2005 database with access controlled by a couple of AD groups. There is a group to provide read only access and one with full access.

Is there an easy way of asking SQL server what level of access a user currently has, i would like my app to pop up with a message telli开发者_开发知识库ng the user if they only have read only access.

Cheers Luke


This is similar to what you ask but for the Create Table permission, should be easy to follow and apply needed changes: How can I detect whether I have CREATE TABLE permission?


If you use sp_helpuser it will return a table of users with their current roles.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜