acl scope data resolve boolean to true if not false
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user