You are here

public function NodeBooleanField::mayEditSetting in Fasttoggle 8.2

Access control function.

Parameters

$node: The node against which to check (un)publish permission.

Return value

boolean Whether the user is allowed to (un)publish the node.

Overrides SettingTrait::mayEditSetting

File

src/Plugin/Setting/NodeBooleanField.php, line 56
Fasttoggle Node Sticky

Class

NodeBooleanField
Abstract interface for settings. Plugin strings are used for quick filtering without the need to instantiate the class.

Namespace

Drupal\fasttoggle\Plugin\Setting

Code

public function mayEditSetting() {
  $user = \Drupal::currentUser();

  //@TODO Needs more tests?
  return AccessResult::allowedIfHasPermission($user, 'edit any article content');
}