public function ChangeOgMembershipActionTestBase::noAccessProvider in Organic groups 8
Data provider for testNoAccess().
Overrides ActionTestBase::noAccessProvider
File
- tests/
src/ Kernel/ Action/ ChangeOgMembershipActionTestBase.php, line 54
Class
- ChangeOgMembershipActionTestBase
- Base class for testing action plugins that change membership roles.
Namespace
Drupal\Tests\og\Kernel\ActionCode
public function noAccessProvider() {
return [
// An anonymous user doesn't have access to this action.
[
'anonymous',
'member',
],
[
'anonymous',
'pending',
],
[
'anonymous',
'blocked',
],
[
'anonymous',
'group_administrator',
],
[
'anonymous',
'group_moderator',
],
// A normal authenticated user doesn't have access.
[
'authenticated',
'member',
],
[
'authenticated',
'pending',
],
[
'authenticated',
'blocked',
],
[
'authenticated',
'group_administrator',
],
[
'authenticated',
'group_moderator',
],
// A normal group member doesn't have access.
[
'member',
'member',
],
[
'member',
'pending',
],
[
'member',
'blocked',
],
[
'member',
'group_administrator',
],
[
'member',
'group_moderator',
],
// A pending group member doesn't have access.
[
'pending',
'member',
],
[
'pending',
'pending',
],
[
'pending',
'blocked',
],
[
'pending',
'group_administrator',
],
[
'pending',
'group_moderator',
],
// A blocked group member doesn't have access.
[
'blocked',
'member',
],
[
'blocked',
'pending',
],
[
'blocked',
'blocked',
],
[
'blocked',
'group_administrator',
],
[
'blocked',
'group_moderator',
],
// A group owner doesn't have access if the
// 'group_administrator_full_access' configuration option is not set.
[
'group_owner',
'member',
FALSE,
],
[
'group_owner',
'pending',
FALSE,
],
[
'group_owner',
'blocked',
FALSE,
],
[
'group_owner',
'group_administrator',
FALSE,
],
[
'group_owner',
'group_moderator',
FALSE,
],
];
}