From 854acf78cd792a7964103b4d51675d9f27d1eab1 Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Mon, 3 Sep 2012 14:33:39 +0100 Subject: [PATCH] Move create read-only user script to datastore/bin --- {bin => ckanext/datastore/bin}/create_read_only_user.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename {bin => ckanext/datastore/bin}/create_read_only_user.sql (93%) diff --git a/bin/create_read_only_user.sql b/ckanext/datastore/bin/create_read_only_user.sql similarity index 93% rename from bin/create_read_only_user.sql rename to ckanext/datastore/bin/create_read_only_user.sql index 3c9ecc916ab..480daae84f4 100644 --- a/bin/create_read_only_user.sql +++ b/ckanext/datastore/bin/create_read_only_user.sql @@ -7,7 +7,7 @@ Please set the variables to you current setup. For testing purposes it is possible to set maindb = datastoredb. To run the script, execute: - psql -d datastore -f create_read_only_user.sql + sudo -u postgres psql -d datastore -f create_read_only_user.sql License: MIT */ @@ -45,6 +45,5 @@ GRANT USAGE ON SCHEMA public TO :rouser; GRANT SELECT ON ALL TABLES IN SCHEMA public TO :rouser; -- grant access to new tables and views by default --- for user: the user who creates a new table ALTER DEFAULT PRIVILEGES FOR USER :ckanuser IN SCHEMA public GRANT SELECT ON TABLES TO :rouser;