You are here

public function TeamRole::hasPermission in Apigee Edge 8

Checks if the role has a permission.

Parameters

string $permission: The permission to check for.

Return value

bool TRUE if the role has the permission, FALSE if not.

Overrides TeamRoleInterface::hasPermission

1 call to TeamRole::hasPermission()
TeamRole::grantPermission in modules/apigee_edge_teams/src/Entity/TeamRole.php
Grant permissions to the role.

File

modules/apigee_edge_teams/src/Entity/TeamRole.php, line 98

Class

TeamRole
Defines the Team Role entity.

Namespace

Drupal\apigee_edge_teams\Entity

Code

public function hasPermission($permission) : bool {
  return in_array($permission, $this
    ->getPermissions());
}