Alfresco:文件夹权限按角色 [英] Alfresco: Folder permission by role

查看:30
本文介绍了Alfresco:文件夹权限按角色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:我们有一个空间模板,用作共享网站文档库的文件夹结构.我们的目标是使某些文件夹对具有自定义角色(在 sitePermissions.xml 中创建)的特殊用户可见.通常,我们可以对群组执行此操作,但我们需要对角色执行此操作(例如,当我们邀请外部用户时,我们希望为他分配一个内部角色,以便他可以自动查看某些文件夹).

Problem: we have a space template that we use as a folder structure for share sites document library. Our aim is to make visible some folders to special users that have a custom role (created in sitePermissions.xml). generally we can do that with groups but we need to do that with roles (e.g. when we invite an external user, we wish to assign him to an internal role so he can automatically see some folders).

请帮助我们提供一些线索.

Please help us with some clues.

推荐答案

这是可能的,但您不想像 Andreas 建议的那样去那里.即使是 Alfresco 自己的(旧方式)站点权限也是一样的.site_manager、site_collaborator 等是 Alfresco 创建的系统组,如果您在这些组之一中,您将在站点内获得许可.

It's possible but you don't want to go there like Andreas is suggesting. Even Alfresco's own (older way) of site permissions is the same. The site_manager, site_collaborator etc. are system groups which Alfresco creates and if you're in one of those groups you'll have your permission within the site.

好吧,如果你仍然坚持,这是要走的路.有 2 个存储库 web 脚本可以获取 Documentlibrary(不包括搜索、文档详细信息等其他方式)

Oke if you still insist, here is the way to go. There are 2 repository webscripts to get the Documentlibrary (not counting other ways like search, document-details, etc.)

  • alfresco emplateswebscriptsorgalfrescoslingshotdocumentlibrary-v2doclist.get
  • alfresco emplateswebscriptsorgalfrescoslingshotdocumentlibrary reenode.get

打开相应的 .js 文件(覆盖它们).当循环遍历项目时,获取节点的所有权限集,然后将权限与您需要的权限相匹配.如果是真的通过,如果是假的不要添加.

Open the corresponding .js files (override them). When looping through the items get all the permissionset for the node, then match the permission to the one you need. If it's true go through and if it's false don't add it.

然后我想再次声明,这是一项繁重的操作,因此如果您有一个庞大的文件夹集合,并且您正在使用 100 个并发用户执行此操作,那么用户将不会对性能感到满意.

Then again I want to state that this is a heavy operation, so if you have a huge folder collection and you're doing this with like 100 concurrent user, the users won't be happy with the performance.

这篇关于Alfresco:文件夹权限按角色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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