walrus icon indicating copy to clipboard operation
walrus copied to clipboard

Confirm `claims_role` has `SELECT` permission to all ref'd types after insert to `realtime.subscriptions`

Open olirice opened this issue 3 years ago • 1 comments

Use a trigger to make sure the claims_role will be able to select from the table without getting an error like

ERROR:  type "some_schema.some_type" does not exist

olirice avatar Feb 19 '22 13:02 olirice

Ref: https://www.postgresql.org/docs/13/functions-info.html

pg_catalog.has_type_privilege ( [ user name or oid, ] type text or oid, privilege text ) → boolean

Does user have privilege for data type? The only allowable privilege type is USAGE. When specifying a type by name rather than by OID, the allowed input is the same as for the regtype data type (see [Section 8.19](https://www.postgresql.org/docs/13/datatype-oid.html)).

olirice avatar Feb 19 '22 13:02 olirice