Users, AllUsers 和 SiteUsers

SPWeb 对象有三个与用户的集合有关的属性, 下面列出了他们的区别, 为防止中文含义表达不清, 英文解释也列在下面.

 

SPWeb.Users

=============

这个是所有直接加过权限的用户,就是add user时候不指定组,直接加个权限. 这些用户不属于任何站点的用户组

(This represents the collection of users or user objects who have been explicitly assigned permissions in the Web site . This does not return users who have access through a group).

 

SPWeb.AllUsers

=============

Allusers = Users + AD Group.

第一部分和上面一样,第二部分是这个用户登录过站点,但是他的权限是通过在SharePoint上给某个AD的group加权限获得的

(This gives us the collection of user objects who are either members of the site collection or who have at least navigated to the site as authenticated members of a domain group in the site).

 

SPWeb.SiteUsers

=============

SiteUsers = AllUsers + SharePoint Group = Users + AD Group + SharePoint Group

站点集中的所有的可用的用户, 包括WSS添加的隐藏的用户, 还包括通过SharePoint Group赋予权限的用户.

(All the available users in the site collection, including some hidden users added by WSS. This is the collection of all users that belong to the site collection.)

 

参考资料:

Users, AllUsers and SiteUsers

http://jason-xge2.blogspot.com/2007/07/users-allusers-and-siteusers.html

 

鸣谢:

感谢李楠同学的耐心讲解.

posted on   中道学友  阅读(1009)  评论(0编辑  收藏  举报

编辑推荐:
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2010-02-25 记一次configuration wizard运行失败
2010-02-25 升级SharePoint场的时候, 运行Configuration Wizard需要有什么顺序么?
2010-02-25 可以完成发送邮件功能的C#代码
2010-02-25 介绍一个免费的VS小插件- RockScroll
2010-02-25 寻找SPS2003的UI里文档或页面在数据库中的对应

导航

< 2011年2月 >
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 1 2 3 4 5
6 7 8 9 10 11 12

技术追求准确,态度积极向上

点击右上角即可分享
微信分享提示