Skip to content

Commit 4628d87

Browse files
committed
使用 laravel 的适配器的时候,数据能写进去,但是检查权限全部是 false
#1
1 parent f9e7170 commit 4628d87

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Adapter/LaravelDatabaseAdapter.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,7 @@ public function loadPolicy(Model $model): void
9898
{
9999
$rows = $this->model->getAllFromCache();
100100
foreach ($rows as $row) {
101-
$line = implode(', ', array_filter(array_slice($row, 1), function ($val) {
102-
return '' != $val && !is_null($val);
103-
}));
104-
$this->loadPolicyLine(trim($line), $model);
101+
$this->loadPolicyArray($this->filterRule($row), $model);
105102
}
106103
}
107104

0 commit comments

Comments
 (0)