protected function GroupContentOperationAccessAlterTest::userHasAccess in Organic groups 8
Checks whether the test user has access to perform the entity operation.
Parameters
string $operation: The entity operation to check.
Return value
bool TRUE if the user has access, FALSE otherwise.
1 call to GroupContentOperationAccessAlterTest::userHasAccess()
- GroupContentOperationAccessAlterTest::testGroupContentEntityOperationAccessAlterHook in tests/
src/ Kernel/ Access/ GroupContentOperationAccessAlterTest.php - Tests that modules can alter group content entity operation access.
File
- tests/
src/ Kernel/ Access/ GroupContentOperationAccessAlterTest.php, line 162
Class
- GroupContentOperationAccessAlterTest
- Test that access to group content operations can be altered.
Namespace
Drupal\Tests\og\Kernel\AccessCode
protected function userHasAccess(string $operation) : bool {
return $this->ogAccess
->userAccessGroupContentEntityOperation($operation, $this->group, $this->groupContent, $this->user)
->isAllowed();
}