简体   繁体   English

如何使用DQL在Documentum中创建新的ACL

[英]how to create a new ACL in Documentum with DQL

I am doing a Java project connected to Documentum data storage and I need to create a ACL using DQL . 我正在做一个连接Documentum数据存储的Java项目,我需要使用DQL创建一个ACL。 Any idea on how can I do that ? 关于如何执行此操作的任何想法? I've found the following in my researches in EMC forums but I dont really understand how to use it ? 我在EMC论坛的研究中发现了以下内容,但我真的不知道如何使用它?

create,c,dm_acl  
set,c,l,object_name  
your_acl_name  
set,c,l,owner_name  
dm_dbo  
grant,c,l,dm_world,1      // Granting Permission  
revoke,c,l,dm_world,execute_proc,change_permit  // Revoking permission  
grant,c,l,your_admin,7,execute_proc,change_permit  // granting permission with extended permissions  
save,c,l 

You can create dm_acl object using DQL like this: 您可以使用DQL创建dm_acl对象,如下所示:

CREATE dm_acl OBJECT SET object_name='your_acl_name', SET owner_name='dm_dbo' 创建dm_acl对象SET object_name ='your_acl_name',SET owner_name ='dm_dbo'

but you will not be able to grant, revoke permissions using DQL. 但您将无法使用DQL授予,撤消权限。

If you are connected to Content Server from Java and you can run DQL queries why don't you simply use DFC API to create an ACL? 如果您从Java连接到Content Server,并且可以运行DQL查询,为什么不简单地使用DFC API创建ACL? I guess you have access to IDfSession? 我想您可以访问IDfSession?

Eg 例如

IDfACL acl = (IDfACL)session.newObject("dm_acl");
acl.setObjectName(name);
acl.setDescription(description);
acl.save();

And then you can easily grant,revoke: 然后您可以轻松地授予,撤消:

IDfPermit permit = new DfPermit();

permit.setAccessorName("some group");
permit.setPermitType(IDfPermit.DF_ACCESS_PERMIT);
permit.setPermitValue(IDfACL.DF_PERMIT_READ_STR);
acl.grantPermit(permit);
acl.save();

What you have write is set of API command to create ACL. 您编写的是一组用于创建ACL的API命令。 You need something like 你需要类似的东西

IDfACL acl = (IDfACL)getSession().newObject("dm_acl");
acl.grant("<user_or_group_name>", IDfACL.DF_PERMIT_WRITE, IDfACL.DF_XPERMIT_CHANGE_LOCATION_STR)
... // you can countinue to add permissions here

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM