You are here

protected function OgComplex::isGroupAdmin in Organic groups 8

Determines if the current user has group admin permission.

Return value

bool TRUE if the user is a group admin.

1 call to OgComplex::isGroupAdmin()
OgComplex::form in src/Plugin/Field/FieldWidget/OgComplex.php
Creates a form element for a field.

File

src/Plugin/Field/FieldWidget/OgComplex.php, line 358

Class

OgComplex
Plugin implementation of the 'entity_reference autocomplete' widget.

Namespace

Drupal\og\Plugin\Field\FieldWidget

Code

protected function isGroupAdmin() {

  // @todo Inject current user service as a dependency.
  return \Drupal::currentUser()
    ->hasPermission('administer organic groups');
}