gpt4 book ai didi

How to add permissions on existing temporal document for the role in Marklogic?(如何为MarkLogic中的角色添加对现有时态文档的权限?)

转载 作者:bug小助手 更新时间:2023-10-25 19:18:39 25 4
gpt4 key购买 nike



The MarkLogic database with temporal functionality contains data with permissions assigned to specific roles. However, we now need to grant read access to a particular role for temporal documents. I have attempted to utilize a MarkLogic function to enable this read permission.

具有临时功能的MarkLogic数据库包含具有分配给特定角色的权限的数据。但是,我们现在需要为临时文档授予特定角色的读取访问权限。我已尝试使用MarkLogic函数来启用此读取权限。


 xdmp:document-add-permissions(
"/entities/abc.xml",
(xdmp:permission("read-user", "read"))
)

But getting the below error:

但得到以下错误:



1.0-ml] SEC-TEMPORALDOC: xdmp:document-add-permissions("/entities/abc.xml",
<sec:permission xmlns:sec="http://marklogic.com/xdmp/security">
sec:capability...</sec:capability>...</sec:permission>)
-- Cannot perform non-temporal operation on document in temporal collection



Kindly suggest how can I provide the new permissions on temporal documents.

请建议我如何在临时文档上提供新权限。


更多回答
优秀答案推荐

As the error message states, you cannot perform non-temporal operations on temporal documents.

正如错误消息所述,您不能对临时文档执行非临时操作。


Use the temporal function temporal:document-insert() and set the appropriate options with the permissions you want to set.

使用临时函数Temporal:Document-Insert(),并使用您想要设置的权限设置适当的选项。


更多回答

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