Implement ACL runtime enforcement and management API
This commit is contained in:
15
priv/repo/migrations/20260316162012_add_acl_rules.exs
Normal file
15
priv/repo/migrations/20260316162012_add_acl_rules.exs
Normal file
@@ -0,0 +1,15 @@
|
||||
defmodule Parrhesia.Repo.Migrations.AddAclRules do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:acl_rules) do
|
||||
add(:principal_type, :string, null: false)
|
||||
add(:principal, :binary, null: false)
|
||||
add(:capability, :string, null: false)
|
||||
add(:match, :map, null: false, default: %{})
|
||||
timestamps(updated_at: false, type: :utc_datetime_usec)
|
||||
end
|
||||
|
||||
create(index(:acl_rules, [:principal_type, :principal, :capability]))
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user