From f5f83e814880c862b5bfd0ee935b8c9e7699bd74 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Mon, 13 Jan 2020 14:49:28 -0500 Subject: [PATCH] Fix issue processwire/processwire-issues#1062 --- .../Fieldtype/FieldtypeOptions/SelectableOptionConfig.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wire/modules/Fieldtype/FieldtypeOptions/SelectableOptionConfig.php b/wire/modules/Fieldtype/FieldtypeOptions/SelectableOptionConfig.php index 73a7bd84..360c8c93 100644 --- a/wire/modules/Fieldtype/FieldtypeOptions/SelectableOptionConfig.php +++ b/wire/modules/Fieldtype/FieldtypeOptions/SelectableOptionConfig.php @@ -60,7 +60,9 @@ class SelectableOptionConfig extends Wire { protected function process(Inputfield $inputfield) { $value = $this->wire('input')->post('_options'); - if($this->wire('process') != 'ProcessField' || !$this->wire('user')->isSuperuser()) return; + $user = $this->wire('user'); /** @var User $user */ + $process = $this->wire('process'); /** @var Process @process */ + if($process != 'ProcessField' || (!$user->isSuperuser() && !$user->hasPermission('field-admin'))) return; $ns = "$this$this->field"; // namespace for session if(!is_null($value)) {