Skip to content

Instantly share code, notes, and snippets.

@dangerousbeans
Created October 5, 2011 13:09
Show Gist options
  • Save dangerousbeans/1264383 to your computer and use it in GitHub Desktop.
Save dangerousbeans/1264383 to your computer and use it in GitHub Desktop.
-- What roles have access to which attributes on the given entity
SELECT r.name, a.name
FROM meta_attribute_roles ar
JOIN roles r on ar.role_id = r.id
JOIN meta_attributes a ON ar.meta_attribute_id = a.id
JOIN meta_entities e ON a.meta_entity_id = e.id
WHERE e.name like '%festival%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment