Skip to content

Commit 6482f79

Browse files
TrixterTheTuxDaneEveritt
authored andcommitted
Grant execute privilege (pterodactyl#655)
closes pterodactyl#654
1 parent 92ca84a commit 6482f79

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/Repositories/Eloquent/DatabaseRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function assignUserToDatabase($database, $username, $remote, $connection
9393
{
9494
return $this->runStatement(
9595
sprintf(
96-
'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX ON `%s`.* TO `%s`@`%s`',
96+
'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX, EXECUTE ON `%s`.* TO `%s`@`%s`',
9797
$database,
9898
$username,
9999
$remote

tests/Unit/Repositories/Eloquent/DatabaseRepositoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function testCreateUserStatement()
117117
*/
118118
public function testUserAssignmentToDatabaseStatement()
119119
{
120-
$query = sprintf('GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX ON `%s`.* TO `%s`@`%s`', 'test_database', 'test', '%');
120+
$query = sprintf('GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX, EXECUTE ON `%s`.* TO `%s`@`%s`', 'test_database', 'test', '%');
121121
$this->repository->shouldReceive('runStatement')->with($query, 'test')->once()->andReturn(true);
122122

123123
$this->assertTrue($this->repository->assignUserToDatabase('test_database', 'test', '%', 'test'));

0 commit comments

Comments
 (0)