fix(var): fail on missing user when hiding env values
This commit is contained in:
parent
0b811b5ef6
commit
88ec944be7
1 changed files with 3 additions and 3 deletions
|
|
@ -220,7 +220,7 @@ public function syncData(bool $toModel = false)
|
|||
$this->is_required = (bool) ($this->env->is_required ?? false);
|
||||
// Use the stored column, not the value-based accessor (that decrypts).
|
||||
$this->is_shared = (bool) ($this->env->getAttributes()['is_shared'] ?? false);
|
||||
$this->isValueHidden = auth()->user()?->isMember() ?? false;
|
||||
$this->isValueHidden = auth()->user()?->isMember() ?? true;
|
||||
|
||||
if ($this->valuesLoaded) {
|
||||
$this->hydrateValueFields();
|
||||
|
|
@ -247,12 +247,12 @@ private function hydrateValueFields(): void
|
|||
$this->is_really_required = $this->is_required && blank($this->value);
|
||||
}
|
||||
|
||||
if ($this->env->is_shown_once || auth()->user()?->isMember()) {
|
||||
if ($this->env->is_shown_once || (auth()->user()?->isMember() ?? true)) {
|
||||
$this->value = null;
|
||||
$this->real_value = null;
|
||||
}
|
||||
|
||||
$this->isValueHidden = auth()->user()?->isMember() ?? false;
|
||||
$this->isValueHidden = auth()->user()?->isMember() ?? true;
|
||||
}
|
||||
|
||||
public function checkEnvs()
|
||||
|
|
|
|||
Loading…
Reference in a new issue