From 6482f79088e3d98667af644a71fb5bdcd6e5d1b0 Mon Sep 17 00:00:00 2001 From: TrixterTheTux Date: Wed, 4 Oct 2017 01:53:28 +0300 Subject: [PATCH] Grant execute privilege (#655) closes #654 --- app/Repositories/Eloquent/DatabaseRepository.php | 2 +- tests/Unit/Repositories/Eloquent/DatabaseRepositoryTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Repositories/Eloquent/DatabaseRepository.php b/app/Repositories/Eloquent/DatabaseRepository.php index 898b59a55..de3ff65bf 100644 --- a/app/Repositories/Eloquent/DatabaseRepository.php +++ b/app/Repositories/Eloquent/DatabaseRepository.php @@ -93,7 +93,7 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor { return $this->runStatement( sprintf( - 'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX ON `%s`.* TO `%s`@`%s`', + 'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX, EXECUTE ON `%s`.* TO `%s`@`%s`', $database, $username, $remote diff --git a/tests/Unit/Repositories/Eloquent/DatabaseRepositoryTest.php b/tests/Unit/Repositories/Eloquent/DatabaseRepositoryTest.php index b601e538c..f33ec15e3 100644 --- a/tests/Unit/Repositories/Eloquent/DatabaseRepositoryTest.php +++ b/tests/Unit/Repositories/Eloquent/DatabaseRepositoryTest.php @@ -117,7 +117,7 @@ class DatabaseRepositoryTest extends TestCase */ public function testUserAssignmentToDatabaseStatement() { - $query = sprintf('GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX ON `%s`.* TO `%s`@`%s`', 'test_database', 'test', '%'); + $query = sprintf('GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX, EXECUTE ON `%s`.* TO `%s`@`%s`', 'test_database', 'test', '%'); $this->repository->shouldReceive('runStatement')->with($query, 'test')->once()->andReturn(true); $this->assertTrue($this->repository->assignUserToDatabase('test_database', 'test', '%', 'test'));