禁用用户主文件夹创建 [英] Disable the user home folder creation
问题描述
当管理员用户创建用户时,我自定义代码以打开和关闭 homeFolderCreationEager,但它只能延迟文件夹的创建。当相应的用户登录时,将自动创建该用户的文件夹。
When the admin user create the user, I customize the code to switch on and off "homeFolderCreationEager" but it can only delay the creation of the folder. When the corresponding user logs in, the folder for that user is automatically created.
如何防止这种情况发生?
可以提供任何帮助。
How can I prevent this from happening ? Any kind help is appreciated.
推荐答案
如 wiki ,您可以配置用户共享公司主页空间。如果您使用的是LDAP同步,则可以使用
As stated in the wiki, you can configure the users to share the Company Home space. If you're using LDAP synchronization, you can configure it with
ldap.synchronization.defaultHomeFolderProvider=companyHomeFolderProvider
否则,您需要否决默认的Spring配置并定义以下bean(名称
属性当然很重要,因为您需要覆盖默认配置):
Otherwise you need to overrule the default Spring configuration and define the following bean (the name
attribute is of course important as you need to override default configurations):
<bean name="homeFolderManager" class="org.alfresco.repo.security.person.HomeFolderManager" init-method="init">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="policyComponent">
<ref bean="policyComponent" />
</property>
<property name="defaultProvider">
<!-- here's the custom part: -->
<ref bean="companyHomeFolderProvider" />
</property>
<property name="enableHomeFolderCreationAsPeopleAreCreated">
<value>${home.folder.creation.eager}</value>
</property>
</bean>
还有其他默认提供程序,请查看 authentication-services- context.xml
了解更多。
There are other default providers available, have a look at authentication-services-context.xml
for more.
这篇关于禁用用户主文件夹创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!