使用自定义网站模板在网站创建期间为此网站设置组 [英] Set up groups for this site during Site creation using a custom site template

查看:67
本文介绍了使用自定义网站模板在网站创建期间为此网站设置组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为SharePoint开发人员,我会看到为此网站设置组"每次我创建具有唯一权限的网站时,都会显示该页面.但是,我从未真正感到有必要向专家询问此事.但是今天我做到了.我正在SP 2016环境中工作. 以下介绍了我的步骤:

场景1:
我已经使用现成的团队网站模板创建了一个名为OOTB1(/sites/OOTB1)的网站集.在没有任何自定义的情况下,我已经使用将网站另存为模板"将网站集OOTB1保存为模板.并命名为OOTBSiteTemplate (我选择在模板创建期间包含内容).

场景2:
我正在使用先前保存的模板OOTBSiteTemplate创建一个名为Team1的新网站集.在Team1下,
a)我已经在Team1下创建了一个名为"t1u"的子网站.从具有独特权限的即用型团队网站模板中获取.
b)现在,我正在使用OOTBSiteTemplate模板在Team1下创建一个具有唯一权限的名为t1tu的子站点.当我点击创建"时,我会被带到为此网站设置组"屏幕和3个类别此网站的访问者",会员" 本网站的所有者",本网站的所有者"已默认设置为使用现有组" (尽管我选择在此网站创建过程中使用唯一权限).这里的问题是,组下拉列表默认为来自 父网站Team1或子网站"t1u".请参阅随附的屏幕截图.

As a SharePoint developer, I see the "Set up Groups for this Site" page every time I create a site with unique permissions. However, I never really felt the need to ask the experts about this. But today I do. I am working on a SP 2016 environment. The following describes my steps:

Scene 1:
I have created a Site collection called OOTB1 (/sites/OOTB1) using an Out-of-the-box Team site template. Without any customizations, I have saved the site collection OOTB1 as a template using the "Save site as template" and called it OOTBSiteTemplate (I have opted to Include Content during the template creation).

Scene 2:
I am creating a new Site collection called Team1 using the previously saved template OOTBSiteTemplate. Under Team1,
a) I have created a subsite under Team1 called "t1u" from an out of the box team site template with unique permissions.
b) I am now creating a subsite under Team1 called t1tu, with unique permissions, using the OOTBSiteTemplate template. When I hit create, I am taken to the "Set up Groups for this Site" screen and the 3 categories 'Visitors to this Site', 'Members of this Site', 'Owners of this Site' have been defaulted to "Use an existing group" (in spite of me opting to use unique permissions during this site creation). The issue here is that the group drop-downs default to a random group either from the parent site Team1 or the subsite "t1u". See the attached screenshot.



因此,层次结构如下:
/sites/OOTB1(另存为模板.称为OOTBSiteTemplate)
/sites/Team1(使用OOTBSiteTemplate创建此SC)
/sites/Team1/t1u(开箱即用的团队网站模板,并选择了唯一权限)
/sites/Team1/t1tu(使用OOTBSiteTemplate模板并选择了唯一权限)

我有以下问题:
1.为什么单选按钮不默认为创建新组"?反而?
2.在使用现有的组"被选中,为什么下拉具有随机组.例如网站t1u的所有者组,即"t1u所有者"在此处成为访问者组建议.
3.是否有解决办法,还是用户必须手动将单选按钮切换为创建新组"?
4.对于自定义网站模板(OOTBSiteTemplate),我看到此行为.但是,即使选择了使用唯一权限",使用开箱即用的团队模板进行网站创建时也可以使用.使用自定义网站模板是否有缺陷?

以上所有内容均已在SP2016上执行.我相信在早期版本的SharePoint上也会发生同样的情况.请让我知道您的想法.



So the Hierarchy is as follows:
/sites/OOTB1 (Saved as template. Called it OOTBSiteTemplate)
/sites/Team1 (Used OOTBSiteTemplate to create this SC)
/sites/Team1/t1u (Used out of the box team site template and opted for unique permissions)
/sites/Team1/t1tu (Used OOTBSiteTemplate template and opted for unique permissions)

I have the following questions:
1. Why would the radio buttons not default to "Create a new group" instead?
2. When 'Use an existing group' gets selected, why does the drop down have random groups. For e.g. An Owners group of site t1u i.e. 't1u Owners' becomes a visitors group suggestion here.
3. Is there is a way out of this or does the user have to manually switch the radio button to "Create a new group"?
4. I see this behaviour for a custom site template (OOTBSiteTemplate). But the site creation when using the out of the box team template works even when 'Use unique permissions' is selected. Is this a defect with using custom site templates?

All the above have been performed on SP2016. I believe the same occurs on earlier versions of SharePoint. Please let me know your thoughts.

DOT NET,Sharepoint开发人员

DOT NET, Sharepoint Developer

推荐答案

似乎不支持在网站模板中保存组:

It seems that saving groups in a site template is not supported:

不支持"并不意味着它不可能发生,而是得到的结果可能是随机的,这似乎就是您所看到的.

"not supported" doesn't mean that it can't happen, but that what get may be random, which seems to be what you are seeing.  


这篇关于使用自定义网站模板在网站创建期间为此网站设置组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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