Some helpful queries related to object security are described in this section. These queries are based on the information presented in this chapter.
The following query retrieves basic permissions granted on a given object:
SELECT r_accessor_name, r_accessor_permit FROM dm_acl WHERE object_name = (SELECT acl_name FROM dm_document WHERE r_object_id = '0900006480000509') AND owner_name = (SELECT acl_domain FROM dm_document WHERE r_object_id = '0900006480000509')
Note a few things in this query. DQL doesn't allow joins when retrieving repeating properties (accessor name and permit) - this query achieves the same effect using sub-queries. Also note that both
acl_domain should be checked when looking up the ACL for ...