Revoke 与 Grant 相反(至少与 Grant 添加访问规则而 Revoke 删除访问规则一样),而有些违反直觉的 Deny 也添加访问规则(当然可以通过 Revoke 删除)。
如果我授予销售组访问权限,我可以稍后撤销它。
不过,我也可以拒绝您的访问权限,即使您在销售组中,您也无权访问。
Revoke is the opposite of a Grant (at least in as much as Grant adds an access rule and Revoke Removes an access Rule) While somewhat counter-intuative Deny also adds an access rule (which of course can be removed with a Revoke).
If I grant the sales group access I can later revoke it.
However I could also deny you access, and even through you're in the sales group you'll not have access.
REVOKE removes access that has been GRANTed. DENY explicitly rejects, taking precedence over GRANTs.
To the last point, if someone is part of the db_denydatawriter role, but you GRANT INSERT to them, the DENY will override that GRANT and they will be unable to INSERT.
发布评论
评论(4)
每个对象都有一个
DENY
和GRANT
访问规则列表。REVOKE
是从访问规则列表中删除规则的操作。Each object has a list of rules
DENY
ing andGRANT
ing access.REVOKE
is an operation that removes a rule from the list of access rules.Revoke 与 Grant 相反(至少与 Grant 添加访问规则而 Revoke 删除访问规则一样),而有些违反直觉的 Deny 也添加访问规则(当然可以通过 Revoke 删除)。
如果我授予销售组访问权限,我可以稍后撤销它。
不过,我也可以拒绝您的访问权限,即使您在销售组中,您也无权访问。
Revoke is the opposite of a Grant (at least in as much as Grant adds an access rule and Revoke Removes an access Rule) While somewhat counter-intuative Deny also adds an access rule (which of course can be removed with a Revoke).
If I grant the sales group access I can later revoke it.
However I could also deny you access, and even through you're in the sales group you'll not have access.
REVOKE
删除已GRANT
的访问权限。DENY
明确拒绝,优先于GRANT
。最后一点,如果某人是 db_denydatawriter 角色的一部分,但您向他们授予插入权限,那么 DENY 将覆盖该角色GRANT,他们将无法
INSERT
。REVOKE
removes access that has beenGRANT
ed.DENY
explicitly rejects, taking precedence overGRANT
s.To the last point, if someone is part of the
db_denydatawriter
role, but youGRANT INSERT to
them, theDENY
will override thatGRANT
and they will be unable toINSERT
.授予权限意味着用户可以访问该对象
拒绝权限覆盖授予的权限
撤销权限将删除已分配的权限,无论它是被拒绝的权限还是授予的权限
Granting Permission means that a user can access the object
Denying permission overrides a granted permission
Revoking a permission removes the permission that has been assigned, regardless of whether it was a denied permission or a granted permission