public function NodeListField::mayEditSetting in Fasttoggle 8.2
Access control function.
Parameters
$node: The node against which to check permission.
Return value
boolean Whether the user is allowed to modify the node.
Overrides SettingTrait::mayEditSetting
File
- src/
Plugin/ Setting/ NodeListField.php, line 57 - Fasttoggle Node Sticky
Class
- NodeListField
- Abstract interface for settings. Plugin strings are used for quick filtering without the need to instantiate the class.
Namespace
Drupal\fasttoggle\Plugin\SettingCode
public function mayEditSetting() {
$user = \Drupal::currentUser();
//@TODO Needs more tests?
return AccessResult::allowedIfHasPermission($user, 'edit any article content');
}