class RailsAiAdmin::Authorization::Adapter
Default-deny policy interface. Hosts explicitly implement every permission.
Public Instance Methods
Source
# File lib/rails_ai_admin/authorization/adapter.rb, line 11 def allowed?(context:, action:, resource:, record: nil) false end
Source
# File lib/rails_ai_admin/authorization/adapter.rb, line 61 def assistant?(context:, resource:) false end
Exposes this resource to the admin assistant’s tools. Human read grants still apply to every tool call; this grant only decides whether the model may see the resource at all. The assistant is available to an actor when at least one resource grants it.
Source
# File lib/rails_ai_admin/authorization/adapter.rb, line 41 def cancel_operation?(context:, resource:, operation:) false end
Source
# File lib/rails_ai_admin/authorization/adapter.rb, line 33 def deliver_work?(context:, resource:, operation:, work_kind:, record:) false end
Delivery authorizes a committed fact, not re-execution of its command.
Source
# File lib/rails_ai_admin/authorization/adapter.rb, line 67 def export_records?(context:, resource:) false end
Downloads the current list as CSV. Rows, columns and values still come from the index, show and read grants; this grant only adds the button.
Source
# File lib/rails_ai_admin/authorization/adapter.rb, line 17 def fields(context:, resource:, action:, record: nil) [] end
action is :read, :write, :search, :sort or :filter; no implicit grants. Filtering reveals values through membership, so it is never implied by read.
Source
# File lib/rails_ai_admin/authorization/adapter.rb, line 73 def import_records?(context:, resource:) false end
Creates records from an uploaded CSV file. Each row still needs the create grant, write field grants and validations.
Source
# File lib/rails_ai_admin/authorization/adapter.rb, line 48 def named_scopes(context:, resource:) [] end
Named list scopes (declared tabs) this actor may use. A scope predicate can reveal facts about fields the actor cannot read, so it is granted apart from index/read/search/sort.
Source
# File lib/rails_ai_admin/authorization/adapter.rb, line 28 def operation_fields(context:, resource:, operation:, record: nil) [] end
Custom operation inputs are independent of ordinary attribute write grants.
Source
# File lib/rails_ai_admin/authorization/adapter.rb, line 23 def presentation_fields(context:, resource:, view:, record: nil) nil end
Optional per-view narrowing, never a replacement for read/write grants. nil adds no restriction; [] hides every field in that view.
Source
# File lib/rails_ai_admin/authorization/adapter.rb, line 37 def read_operation_receipt?(context:, resource:, operation:, record:) false end
Source
# File lib/rails_ai_admin/authorization/adapter.rb, line 7 def scope(context:, resource:, relation:) relation.none end
Source
# File lib/rails_ai_admin/authorization/adapter.rb, line 53 def select_records?(context:, resource:) false end
Capturing/viewing a fixed selection is independent of list/read/write.
Source
# File lib/rails_ai_admin/authorization/adapter.rb, line 80 def view_audit_log?(context:, resource:) false end
Lists this resource’s audit events on the audit log page, across records and actors of the current tenant. Field names still follow the read and write grants.
Source
# File lib/rails_ai_admin/authorization/adapter.rb, line 87 def view_history?(context:, resource:, record:) false end
Shows a record’s change history (who changed it, when, which fields). Field names are filtered to the actor’s current read and write grants; this grant only decides whether the page exists for the record.