Commit 6f97fc13 authored by Marius Burkard's avatar Marius Burkard
Browse files

- fixed db privileges

parent e06b59c8
Loading
Loading
Loading
Loading
+31 −25
Original line number Diff line number Diff line
@@ -92,6 +92,9 @@ class mysql_clientdb_plugin {
						$result->free();
				}
		}
		
		$app->log("Calling $action for $database_name with access $user_access_mode and hosts " . implode(', ', $host_list), LOGLEVEL_DEBUG);
		
		// loop through hostlist
		foreach($host_list as $db_host) {
			$db_host = trim($db_host);
@@ -112,7 +115,10 @@ class mysql_clientdb_plugin {
				$valid = false;
			}

			if($valid == false) continue;
			if($valid == false) {
				$app->log("Invalid host " . $db_host . " for GRANT to " . $database_name, LOGLEVEL_DEBUG);
				continue;
			}
			
			$grants = 'ALL';
			if($user_access_mode == 'r') $grants = 'SELECT';