how to create a new ACL in Documentum with DQL

不打扰是莪最后的温柔 提交于 2020-01-06 11:10:26

问题


I am doing a Java project connected to Documentum data storage and I need to create a ACL using DQL . 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 ?

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 

回答1:


You can create dm_acl object using DQL like this:

CREATE dm_acl OBJECT SET object_name='your_acl_name', SET owner_name='dm_dbo'

but you will not be able to grant, revoke permissions using 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? I guess you have access to IDfSession?

E.g.

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();



回答2:


What you have write is set of API command to create ACL. 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


来源:https://stackoverflow.com/questions/39487593/how-to-create-a-new-acl-in-documentum-with-dql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!