From 70c7f86214b53b379d7606d6552f092a1e6eea6c Mon Sep 17 00:00:00 2001 From: zds <49744633+zds-s@users.noreply.github.com> Date: Fri, 5 Sep 2025 11:59:07 +0800 Subject: [PATCH] delete casbin --- config/autoload/casbin/rbac-model.conf | 14 ------ config/autoload/permission.php | 47 ------------------- .../2020_07_22_213202_create_rules_table.php | 43 ----------------- 3 files changed, 104 deletions(-) delete mode 100644 config/autoload/casbin/rbac-model.conf delete mode 100644 config/autoload/permission.php delete mode 100644 databases/migrations/2020_07_22_213202_create_rules_table.php diff --git a/config/autoload/casbin/rbac-model.conf b/config/autoload/casbin/rbac-model.conf deleted file mode 100644 index 7854845e4..000000000 --- a/config/autoload/casbin/rbac-model.conf +++ /dev/null @@ -1,14 +0,0 @@ -[request_definition] -r = sub, obj, act - -[policy_definition] -p = sub, obj, act - -[role_definition] -g = _, _ - -[policy_effect] -e = some(where (p.eft == allow)) - -[matchers] -m = g(r.sub, p.sub) && r.obj == p.obj && r.act == p.act || r.sub == "SuperAdmin" \ No newline at end of file diff --git a/config/autoload/permission.php b/config/autoload/permission.php deleted file mode 100644 index 61c6d7f0d..000000000 --- a/config/autoload/permission.php +++ /dev/null @@ -1,47 +0,0 @@ - [ - // Available Settings: "file", "text" - 'type' => 'file', - - 'path' => __DIR__ . '/casbin/rbac-model.conf', - - 'text' => '', - ], - - /* - * Casbin adapter . - */ - // 'adapter' => DatabaseAdapter::class, - - /* - * Database setting. - */ - 'database' => [ - // Database connection for following tables. - 'connection' => 'default', - - // Rule table name. - 'table' => 'rules', - ], - - 'log' => [ - // changes whether Lauthz will log messages to the Logger. - 'enabled' => false, - ], -]; diff --git a/databases/migrations/2020_07_22_213202_create_rules_table.php b/databases/migrations/2020_07_22_213202_create_rules_table.php deleted file mode 100644 index f49d95d07..000000000 --- a/databases/migrations/2020_07_22_213202_create_rules_table.php +++ /dev/null @@ -1,43 +0,0 @@ -bigIncrements('id'); - $table->string('ptype')->nullable(); - $table->string('v0')->nullable(); - $table->string('v1')->nullable(); - $table->string('v2')->nullable(); - $table->string('v3')->nullable(); - $table->string('v4')->nullable(); - $table->string('v5')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down() - { - Schema::dropIfExists(config('permission.database.table')); - } -}