Class: Fosm::AccessEvent

Inherits:
ApplicationRecord show all
Defined in:
app/models/fosm/access_event.rb

Overview

Immutable append-only audit log for RBAC operations.

Records every grant and revoke action so there is a complete audit trail of who had what access, when, and who authorized it.

Written asynchronously via Fosm::AccessEventJob (non-blocking).

Constant Summary collapse

ACTIONS =
%w[grant revoke auto_grant].freeze

Instance Method Summary collapse

Instance Method Details

#auto_grant?Boolean

Returns:

  • (Boolean)


31
# File 'app/models/fosm/access_event.rb', line 31

def auto_grant? = action == "auto_grant"

#grant?Boolean

Returns:

  • (Boolean)


29
# File 'app/models/fosm/access_event.rb', line 29

def grant?      = action == "grant"

#revoke?Boolean

Returns:

  • (Boolean)


30
# File 'app/models/fosm/access_event.rb', line 30

def revoke?     = action == "revoke"