开发者

Break inheritance before creating new list with in same site

开发者 https://www.devze.com 2023-02-16 19:04 出处:网络
Is there a way of 开发者_高级运维breaking inheritance before creating new list/library so that there is no need to delete all security groups from permissions and create new(my site have lots lots of

Is there a way of 开发者_高级运维breaking inheritance before creating new list/library so that there is no need to delete all security groups from permissions and create new(my site have lots lots of groups, so not able to delete all groups is not possible in single attempt.)

Thanks!!!


Check out SPList.BreakRoleInheritance()

SPList list = ... // list creation code
list.BreakRoleInheritance(false);

All permissions from the parent will be deleted. But the current user will be added with "Full Control".

0

精彩评论

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

关注公众号