Alfresco:文件夹权限按角色

编程入门 行业动态 更新时间:2024-10-24 06:32:20
本文介绍了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:文件夹权限按角色

本文发布于:2023-11-28 09:34:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1641870.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件夹   角色   权限   Alfresco

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!