Grant execute privilege (#655)

closes #654
This commit is contained in:
TrixterTheTux 2017-10-04 01:53:28 +03:00 committed by Dane Everitt
parent 92ca84a37f
commit 6482f79088
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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'));