summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrice Maron <brice@bmaron.net>2012-12-03 20:20:17 +0000
committerBrice Maron <brice@bmaron.net>2013-01-28 22:36:58 +0000
commit26e890eb624acbfa41a944309fd776c47b2c9507 (patch)
tree02c5e5290d65e3712e840c989c60a6c1f94874b3
parent0d97cf019c8c66b2c617372248afb34f78078070 (diff)
downloadnextcloud-server-26e890eb624acbfa41a944309fd776c47b2c9507.tar.gz
nextcloud-server-26e890eb624acbfa41a944309fd776c47b2c9507.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 7097d115076..97656fd50f2 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -451,9 +451,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) {