parent
92ca84a37f
commit
6482f79088
|
@ -93,7 +93,7 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
|
||||||
{
|
{
|
||||||
return $this->runStatement(
|
return $this->runStatement(
|
||||||
sprintf(
|
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,
|
$database,
|
||||||
$username,
|
$username,
|
||||||
$remote
|
$remote
|
||||||
|
|
|
@ -117,7 +117,7 @@ class DatabaseRepositoryTest extends TestCase
|
||||||
*/
|
*/
|
||||||
public function testUserAssignmentToDatabaseStatement()
|
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->repository->shouldReceive('runStatement')->with($query, 'test')->once()->andReturn(true);
|
||||||
|
|
||||||
$this->assertTrue($this->repository->assignUserToDatabase('test_database', 'test', '%', 'test'));
|
$this->assertTrue($this->repository->assignUserToDatabase('test_database', 'test', '%', 'test'));
|
||||||
|
|
Loading…
Reference in New Issue