Grant select on configuration table to org members

This commit is contained in:
Juan Ignacio Sánchez Lara 2015-08-14 15:28:19 +02:00
parent 466e4d81c6
commit db89bf1a94
2 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
DO LANGUAGE 'plpgsql' $$ DO LANGUAGE 'plpgsql' $$
BEGIN BEGIN
CREATE TABLE IF NOT EXISTS cartodb.CDB_CONF ( PARAM TEXT PRIMARY KEY, CONF TEXT NOT NULL ); CREATE TABLE IF NOT EXISTS cartodb.CDB_CONF ( PARAM TEXT PRIMARY KEY, CONF TEXT NOT NULL );
EXECUTE format('GRANT SELECT ON cartodb.CDB_CONF TO %s', cartodb.CDB_Organization_Member_Group_Role_Member_Name());
END END
$$; $$;

View File

@ -163,8 +163,8 @@ function setup() {
sql "GRANT USAGE ON SCHEMA cartodb TO public;" sql "GRANT USAGE ON SCHEMA cartodb TO public;"
log_info "########################### BOOTSTRAP ###########################" log_info "########################### BOOTSTRAP ###########################"
${CMD} -d ${DATABASE} -f scripts-available/CDB_Conf.sql
${CMD} -d ${DATABASE} -f scripts-available/CDB_Organizations.sql ${CMD} -d ${DATABASE} -f scripts-available/CDB_Organizations.sql
${CMD} -d ${DATABASE} -f scripts-available/CDB_Conf.sql
${CMD} -d ${DATABASE} -f scripts-available/CDB_Groups.sql ${CMD} -d ${DATABASE} -f scripts-available/CDB_Groups.sql
${CMD} -d ${DATABASE} -f scripts-available/CDB_Groups_API.sql ${CMD} -d ${DATABASE} -f scripts-available/CDB_Groups_API.sql