From 7226068a04ffeef935fe58edf6f40936f2e4458c Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Fri, 25 Jan 2008 08:01:15 +1300 Subject: [PATCH] Ensure database creation applies the right permissions. --- dba/create-database.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/dba/create-database.sh b/dba/create-database.sh index a944cac6..24be25c9 100755 --- a/dba/create-database.sh +++ b/dba/create-database.sh @@ -68,8 +68,18 @@ psql -q -f "${AWLDIR}/dba/schema-management.sql" "${DBNAME}" 2>&1 | egrep -v "(^ # Load the DAViCal tables psql -q -f "${DBADIR}/davical.sql" "${DBNAME}" 2>&1 | egrep -v "(^CREATE |^GRANT|^BEGIN|^COMMIT| NOTICE: )" -psql -q -f "${DBADIR}/caldav_functions.sql" "${DBNAME}" +# psql -q -f "${DBADIR}/caldav_functions.sql" "${DBNAME}" +# +# The supported locales are in a separate file to make them easier to upgrade +#psql -q -f "${DBADIR}/supported_locales.sql" "${DBNAME}" + +# +# Set permissions for the application DB user on the database +${DBADIR}/update-rscds-database --dbname "${DBNAME}" --appuser "${AWL_APPUSER}" --nopatch --revoke "general" + +# +# Load the required base data psql -q -f "${DBADIR}/base-data.sql" "${DBNAME}" # @@ -96,7 +106,3 @@ fi psql -q -c "UPDATE usr SET password = '**${ADMINPW}' WHERE user_no = 1;" "${DBNAME}" echo "The password for the 'admin' user has been set to '${ADMINPW}'" - -# -# The supported locales are in a separate file to make them easier to upgrade -psql -q -f "${DBADIR}/supported_locales.sql" "${DBNAME}"