summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrice Maron <brice@bmaron.net>2012-12-03 20:20:17 +0000
committerBrice Maron <brice@bmaron.net>2012-12-03 20:20:17 +0000
commit4327ed83820f045395bbf1431cdddbdedfa19555 (patch)
tree9a05bdc9513853440243977f155f89aa799c8fd3
parent4cb760a92402ab3eb8550fb05b05eae800030680 (diff)
downloadnextcloud-server-4327ed83820f045395bbf1431cdddbdedfa19555.tar.gz
nextcloud-server-4327ed83820f045395bbf1431cdddbdedfa19555.zip
Revoke DB rights on install only if the db is newly created
-rw-r--r--lib/setup.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/setup.php b/lib/setup.php
index 264cd55795e..fdd10be6824 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -319,9 +319,11 @@ class OC_Setup {
$entry.='Offending command was: '.$query.'<br />';
echo($entry);
}
+ else {
+ $query = "REVOKE ALL PRIVILEGES ON DATABASE \"$e_name\" FROM PUBLIC";
+ $result = pg_query($connection, $query);
+ }
}
- $query = "REVOKE ALL PRIVILEGES ON DATABASE \"$e_name\" FROM PUBLIC";
- $result = pg_query($connection, $query);
}
private static function pg_createDBUser($name, $password, $connection) {