public function RoleBase::remove

8.0.x RoleBase.php public RoleBase::remove($perm)
7.x RoleBase.php public RoleBase::remove($perm)
master RoleBase.php public RoleBase::remove($perm)

File

lib/Drush/Role/RoleBase.php, line 101

Namespace

Drush\Role

Class

RoleBase

Code

public function remove($perm) {
  $perms = $this->getPerms();
  if (in_array($perm, $perms)) {
    $this->revoke_permissions(array($perm));
    return TRUE;
  }
  else {
    drush_log(dt('"!role" does not have the permission "!perm"', array(
      '!perm' => $perm,
      '!role' => $this->name,
    )), 'ok');
    return FALSE;
  }
}