diff --git a/CHANGELOG.md b/CHANGELOG.md index ec45e13db..a72fa998b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ error encountered during creation or update. return different groupings of servers. The default value is `subuser-of` which will include all of the user's servers that they are the owner of, as well as all servers they're a subuser of. * Added back ability to toggle OOM killer status on a per-server basis. +* Added `LOCK` permission for generated database users. ### Changed * Updated Paper egg to not download `server.properties` each time. [parkervcp/eggs#260](https://github.com/parkervcp/eggs/issues/260) diff --git a/app/Repositories/Eloquent/DatabaseRepository.php b/app/Repositories/Eloquent/DatabaseRepository.php index d3b615b92..ffc8a284b 100644 --- a/app/Repositories/Eloquent/DatabaseRepository.php +++ b/app/Repositories/Eloquent/DatabaseRepository.php @@ -153,7 +153,7 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor public function assignUserToDatabase(string $database, string $username, string $remote): bool { return $this->run(sprintf( - 'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX, EXECUTE ON `%s`.* TO `%s`@`%s`', + 'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX, LOCK, EXECUTE ON `%s`.* TO `%s`@`%s`', $database, $username, $remote