Module: Omen::Narrowed
Overview
Extends Omen::Reading with the audience it is asked by: what that audience may read, and the Postgres role that holds it there.
Instance Method Summary collapse
-
#runs_as ⇒ String
Postgres role the statement runs as, which holds what it may read.
-
#settings ⇒ Hash
What is set before the statement, for a row policy of the host's to read.
Instance Method Details
#runs_as ⇒ String
Returns Postgres role the statement runs as, which holds what it may read.
31 |
# File 'app/models/omen/narrowed.rb', line 31 def runs_as = narrowing&.role || Omen.config.narrow_role |
#settings ⇒ Hash
Returns what is set before the statement, for a row policy of the host's to read.
34 |
# File 'app/models/omen/narrowed.rb', line 34 def settings = narrowing ? { narrowing.setting => self[narrowing.by] } : {} |