Skip to content

Commit 281256e

Browse files
gepron1xA248matthewpi
authored
Grant all necessary permissions to generated SQL users (pterodactyl#3800)
* grant all necessary permissions to users * fix CREATE TEMPORARY TABLES Co-authored-by: A248 <theanandbeh@gmail.com> Co-authored-by: A248 <theanandbeh@gmail.com> Co-authored-by: Matthew Penner <me@matthewp.io>
1 parent a9ebf5b commit 281256e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Repositories/Eloquent/DatabaseRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function createUser(string $username, string $remote, string $password, $
107107
public function assignUserToDatabase(string $database, string $username, string $remote): bool
108108
{
109109
return $this->run(sprintf(
110-
'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, REFERENCES, INDEX, LOCK TABLES, CREATE ROUTINE, ALTER ROUTINE, EXECUTE ON `%s`.* TO `%s`@`%s`',
110+
'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, REFERENCES, INDEX, LOCK TABLES, CREATE ROUTINE, ALTER ROUTINE, EXECUTE, CREATE TEMPORARY TABLES, CREATE VIEW, SHOW VIEW, EVENT, TRIGGER ON `%s`.* TO `%s`@`%s`',
111111
$database,
112112
$username,
113113
$remote

0 commit comments

Comments
 (0)