You are here

public function Utility::faqAskUserAccessOr in FAQ_Ask 8

Determines whether the current user has one of the given permissions.

File

src/Utility.php, line 39
Contains \Drupal\faq_ask\Utility.

Class

Utility
Contains static helper functions for FAQ module.

Namespace

Drupal\faq_ask

Code

public function faqAskUserAccessOr($string1, $string2) {
  $user = \Drupal::currentUser();
  return $user
    ->hasPermission($string1) || $user
    ->hasPermission($string2);
}