Skip to content

Instantly share code, notes, and snippets.

@ThiefMaster
Last active May 24, 2021 16:05
Show Gist options
  • Save ThiefMaster/df1443e591cf48e5617f to your computer and use it in GitHub Desktop.
Save ThiefMaster/df1443e591cf48e5617f to your computer and use it in GitHub Desktop.
-- All these commands must be executed as the owner of the object!
GRANT CONNECT ON DATABASE indico TO indico_ro;
ALTER DEFAULT PRIVILEGES GRANT SELECT ON TABLES TO indico_ro;
ALTER DEFAULT PRIVILEGES GRANT SELECT ON SEQUENCES TO indico_ro;
GRANT USAGE ON SCHEMA public TO indico_ro;
GRANT USAGE ON SCHEMA attachments TO indico_ro;
GRANT USAGE ON SCHEMA categories TO indico_ro;
GRANT USAGE ON SCHEMA indico TO indico_ro;
GRANT USAGE ON SCHEMA event_abstracts TO indico_ro;
GRANT USAGE ON SCHEMA event_editing TO indico_ro;
GRANT USAGE ON SCHEMA event_paper_reviewing TO indico_ro;
GRANT USAGE ON SCHEMA event_registration TO indico_ro;
GRANT USAGE ON SCHEMA event_surveys TO indico_ro;
GRANT USAGE ON SCHEMA events TO indico_ro;
GRANT USAGE ON SCHEMA oauth TO indico_ro;
GRANT USAGE ON SCHEMA roombooking TO indico_ro;
GRANT USAGE ON SCHEMA users TO indico_ro;
GRANT USAGE ON SCHEMA plugin_cern_access TO indico_ro;
GRANT USAGE ON SCHEMA plugin_chat TO indico_ro;
GRANT USAGE ON SCHEMA plugin_citadel TO indico_ro;
GRANT USAGE ON SCHEMA plugin_livesync TO indico_ro;
GRANT USAGE ON SCHEMA plugin_outlook TO indico_ro;
GRANT USAGE ON SCHEMA plugin_vc_vidyo TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA attachments TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA categories TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA indico TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA event_abstracts TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA event_editing TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA event_paper_reviewing TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA event_registration TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA event_surveys TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA events TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA oauth TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA roombooking TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA users TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA plugin_cern_access TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA plugin_chat TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA plugin_citadel TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA plugin_livesync TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA plugin_outlook TO indico_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA plugin_vc_vidyo TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA attachments TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA categories TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA indico TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA event_abstracts TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA event_editing TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA event_paper_reviewing TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA event_registration TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA event_surveys TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA events TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA oauth TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA roombooking TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA users TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA plugin_cern_access TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA plugin_chat TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA plugin_citadel TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA plugin_livesync TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA plugin_outlook TO indico_ro;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA plugin_vc_vidyo TO indico_ro;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment