]> source.dussan.org Git - nextcloud-server.git/commitdiff
Revoke DB rights on install only if the db is newly created
authorBrice Maron <brice@bmaron.net>
Mon, 3 Dec 2012 20:20:17 +0000 (20:20 +0000)
committerBrice Maron <brice@bmaron.net>
Mon, 3 Dec 2012 20:20:17 +0000 (20:20 +0000)
lib/setup.php

index 264cd55795e575d0ed08853966157a59da71b814..fdd10be6824b84e90682c11a5be949188a0fb80f 100644 (file)
@@ -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) {