Search code examples
dqldocumentum

how to fetch the objects in dm_acl who grants the same sets of permission at the same time


I am doing a JavaFx project connected to Documentum data source . lets say I have a set of groups : group1 , group2 , group3 How can I query all the acl_names from dm_acl who has only and exactly these groups as their r_acceesor_name . For example using the following query I can get the r_accessor_name of a specific acl:

select r_acceessor_name from dm_acl where object_name = 'My_acl_name' enable (row_based)

and the output is :

group1
group2
group3

But what I want to do is the reverse of this .I've tried the following query :

select object_name from dm_acl where r_accessor_name = 'group1' or r_accessor_name = 'group2' or r_accessor_name = 'group3' enable (row_based) 

But the problem with the output is that it's too general which makes sense because of keyword OR then I tried this :

select object_name from dm_acl where r_accessor_name = 'group1' and r_accessor_name = 'group2' and r_accessor_name = 'group3' enable (row_based) 

which is too specific ==> zero output


Solution

  • You confused yourself more than you can think of. Every ACL object has at least two entries: dm_owner and dm_world where first represents repository owner and the last represents every user in repository.

    Because of it your objective

    ... all the acl_names from dm_acl who has only and exactly these groups ...

    cannot be achieved. However, beside this, your query

    SELECT object_name FROM dm_acl 
    WHERE r_accessor_name = 'group1' 
    AND r_accessor_name = 'group2' 
    AND r_accessor_name = 'group3' 
    ENABLE (ROW_BASED)
    

    is the best you can get. Your problem is that you really don't have ACL in your repository that contains at least these 3 groups. This leads you to the your initial question: either you made wrong presumption either you tried to too much to generalize your question that you've omitted the important part of it. ;)