acl scope data resolve boolean to true if not false

This commit is contained in:
Yuri Kuznetsov
2024-07-09 16:25:44 +03:00
parent 94188f4256
commit 21034bfeb2
2 changed files with 2 additions and 2 deletions
@@ -58,7 +58,7 @@ class ScopeDataResolver
$scopeData = $this->table->getScopeData($foreignScope);
if ($isBoolean && !$scopeData->isBoolean()) {
return ScopeData::fromRaw($scopeData->hasNotNo());
return ScopeData::fromRaw(true);
}
return $scopeData;
@@ -101,6 +101,6 @@ class ScopeDataResolverTest extends TestCase
->with('Test')
->willReturn(ScopeData::fromRaw((object) ['create' => 'no', 'edit' => 'no']));
$this->assertTrue($resolver->resolve('boolean:Test')->isFalse());
$this->assertTrue($resolver->resolve('boolean:Test')->isTrue());
}
}