agent_casbin.php 845 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. return [
  3. /**
  4. * Model 设置
  5. */
  6. 'model' => [
  7. // 可选值: "file", "text"
  8. 'config_type' => 'file',
  9. 'config_file_path' => env('config_path') . 'rbac-model.conf',
  10. 'config_text' => '',
  11. ],
  12. // 适配器 .
  13. 'adapter' => CasbinAdapter\Think\AgentAdapter::class,
  14. /**
  15. * 数据库设置.
  16. */
  17. 'database' => [
  18. // 数据库连接名称,不填为默认配置.
  19. 'connection' => '',
  20. // 策略表名(不含表前缀)
  21. 'casbin_rules_name' => 'agent_system_permissions_access',
  22. // 策略表完整名称.
  23. 'casbin_rules_table' => null,
  24. ],
  25. /**
  26. * ignore
  27. */
  28. 'ignore' => [
  29. 'policy' => [
  30. '/agent/person^get',
  31. '/agent/person^put'
  32. ],
  33. 'users_idx'=> '1'
  34. ]
  35. ];