如何在Sql Server 2008中为表的列设置辅助功能 [英] How Do I Set Accessibility For Columns Of A Table In Sql Server 2008

查看:81
本文介绍了如何在Sql Server 2008中为表的列设置辅助功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有表格名称表格,用户



我希望表格用户中的每个用户访问表格表格中的特定字段。例如:



表格:

Field1

Field2

Field3



用户:

用户1

user2

user1可以修改字段1和2, user2可以修改Field3 !!!!



我该怎么做?

i have tables name Form,Users

I want each user in Table user access particular Fields in Table Form. for ex:

Form:
Field1
Field2
Field3

Users:
User1
user2
user1 can modify fields 1 and 2, user2 can modify Field3!!!!

How can I do that?

推荐答案

你正在寻找这里基于角色的安全性。您的数据库需要有以下表格:



You are looking for role based security here. Your data base needs to have following tables:

User
Role
Rights





现在,您的应用程序需要检查当前用户是否链接到有权更新值的角色。



Now, once you have this, your application needs to check if current user is linked to role which has right to update the values or not.


这篇关于如何在Sql Server 2008中为表的列设置辅助功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆