Skip to content

fix: adapt for v2, fix default privileges and add examples and tests#1

Merged
xocasdashdash merged 1 commit intoxocasdashdash:master-2from
fernandezcuesta:follow-up
Feb 12, 2026
Merged

fix: adapt for v2, fix default privileges and add examples and tests#1
xocasdashdash merged 1 commit intoxocasdashdash:master-2from
fernandezcuesta:follow-up

Conversation

@fernandezcuesta
Copy link

@fernandezcuesta fernandezcuesta commented Feb 11, 2026

Description of your changes

Adapt to Crossplane v2, fixes while testing it and add tests and examples on top of crossplane-contrib#313
Fixes crossplane-contrib#117

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

How has this code been tested

Locally with a kind cluster, running from the examples folder and verified with:

  SELECT                                                                                                                                                                                                                                 
      pg_get_userbyid(d.defaclrole) AS target_role,                                                                                                                                                                                        
      CASE d.defaclobjtype                                                                                                                                                                                                                 
          WHEN 'r' THEN 'table'                                                                                                                                                                                                            
          WHEN 'f' THEN 'function'                                                                                                                                                                                                         
          WHEN 'S' THEN 'sequence'                                                                                                                                                                                                         
          WHEN 'T' THEN 'type'
          WHEN 'n' THEN 'schema'
      END AS object_type,
      n.nspname AS schema,
      pg_get_userbyid((aclexplode(d.defaclacl)).grantee) AS grantee,
      (aclexplode(d.defaclacl)).privilege_type
  FROM pg_default_acl d
  LEFT JOIN pg_namespace n ON d.defaclnamespace = n.oid
  ORDER BY target_role, object_type, grantee;

Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants