select.sql 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. -- Not required. Just shows the sort of queries being sent to DB.
  2. select acl_object_identity.object_id_identity,
  3. acl_entry.ace_order,
  4. acl_object_identity.id as acl_id,
  5. acl_object_identity.parent_object,
  6. acl_object_identity,
  7. entries_inheriting,
  8. acl_entry.id as ace_id,
  9. acl_entry.mask,
  10. acl_entry.granting,
  11. acl_entry.audit_success,
  12. acl_entry.audit_failure,
  13. acl_sid.principal as ace_principal,
  14. acl_sid.sid as ace_sid,
  15. acli_sid.principal as acl_principal,
  16. acli_sid.sid as acl_sid,
  17. acl_class.class
  18. from acl_object_identity,
  19. acl_sid acli_sid,
  20. acl_class
  21. left join acl_entry on acl_object_identity.id = acl_entry.acl_object_identity
  22. left join acl_sid on acl_entry.sid = acl_sid.id
  23. where
  24. acli_sid.id = acl_object_identity.owner_sid
  25. and acl_class.id = acl_object_identity.object_id_class
  26. and (
  27. (acl_object_identity.object_id_identity = 1 and acl_class.class = 'sample.contact.contact')
  28. or
  29. (acl_object_identity.object_id_identity = 2000 and acl_class.class = 'sample.contact.contact')
  30. ) order by acl_object_identity.object_id_identity asc, acl_entry.ace_order asc