gpt4 book ai didi

javascript - Alfresco SetInherite 权限 webscript 安全 api

转载 作者:行者123 更新时间:2023-12-03 11:02:42 28 4
gpt4 key购买 nike

我尝试为露天创建脚本以设置继承权限,但我不知道我的脚本是否正确,这是我的脚本:

继承.post.xml

<webscript>
<shortname>Inherit Permission</shortname>
<description>Inherit Permission of a User or Group from a Folder or Space</description>
<url>/set/folder/permission/inherit/?folderName={folderName}</url>
<format default="html"/>
<transaction>required</transaction>
<authentication>user</authentication>

继承.post.html

<html>
<body>
<p>${myStatus}</p>
</body>
</html>

InheritePermission.post.js

//search for the folder node using lucene search
var folderNode = search.luceneSearch("TYPE:\"{http://www.alfresco.org/model/content/1.0}folder\" AND @cm\\:name:"+args.folderName);

//make sure we only get one node

if(folderNode.length == 1){

folderNode[0].setInheritsPermissions(false);

model.myStatus = "Héritage permis";
}else if (folderNode.length == 0){
//no node was found
model.myStatus = "Folder not found";
}else{
//either greater than two was found
model.myStatus = "Duplicate folder found";
}

最佳答案

Web 脚本的文件名应如下所示。

  • helloworld.get.desc.xml(你的名字错误,应该是 Inherit.post.desc.xml)
  • helloworld.get.js
  • helloworld.get.html.ftl
  • helloworld.get.xml.ftl
  • helloworld.get.html.400.ftl
  • helloworld.get.xml.400.ftl
  • helloworld.get.config.xml
  • helloworld.get.properties

关于javascript - Alfresco SetInherite 权限 webscript 安全 api,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28011409/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com