-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Labels
Description
topthink/framework v8.1.2 + topthink/think-orm v4.0.29 + casbin/casbin v4.0.5 + casbin/think-authz v2.0.3
当config/tauthz.php中 enforcers.basic.cache.enabled=false的时候
删除操作如 deleteRole、deletePermissionsForUser报错
执行到这里面
# 文件 vendor/casbin/think-authz/src/adapter/DatabaseAdapter.php
# line 232
if ($this->cacheHandler->cachePolicies($model)->delete()) {
++$count;
}
# 文件 vendor/casbin/think-authz/src/cache/CacheHandler.php
# line 21 为false时
if ($this->config('cache.enabled', false)) { ... }
异常信息
#0 [10500]DbException in BaseQuery.php line 1442
没有条件不会执行删除操作