mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
@ -1,5 +1,6 @@
|
||||
<?php namespace Tests;
|
||||
|
||||
use BookStack\Entity;
|
||||
use BookStack\Role;
|
||||
use BookStack\Services\PermissionService;
|
||||
use Illuminate\Contracts\Console\Kernel;
|
||||
@ -117,6 +118,16 @@ abstract class BrowserKitTest extends TestCase
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for updating entity permissions.
|
||||
* @param Entity $entity
|
||||
*/
|
||||
protected function updateEntityPermissions(Entity $entity)
|
||||
{
|
||||
$restrictionService = $this->app[PermissionService::class];
|
||||
$restrictionService->buildJointPermissionsForEntity($entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Quick way to create a new user
|
||||
* @param array $attributes
|
||||
|
Reference in New Issue
Block a user