Skip to content

Commit ae3861d

Browse files
authored
Merge pull request #928 from constructive-io/devin/1774674900-fix-grant-privileges-type
fix(node-type-registry): grant_privileges type is string[][] not string[]
2 parents cda85f9 + c749f96 commit ae3861d

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

graphile/node-type-registry/src/blueprint-types.generated.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,8 @@ export interface RelationManyToManyParams {
559559
};
560560
/* Database roles to grant privileges to. Forwarded to secure_table_provision as-is. Default: [authenticated] */
561561
grant_roles?: string[];
562-
/* Privilege grants for the junction table. Forwarded to secure_table_provision as-is. Default: select/insert/delete for all columns */
563-
grant_privileges?: string[];
562+
/* Privilege grants for the junction table as [verb, columns] tuples (e.g. [['select','*'],['insert','*']]). Forwarded to secure_table_provision as-is. Default: select/insert/delete for all columns */
563+
grant_privileges?: string[][];
564564
/* RLS policy type for the junction table. Forwarded to secure_table_provision as-is. NULL means no policy. */
565565
policy_type?: string;
566566
/* Privileges the policy applies to. Forwarded to secure_table_provision as-is. NULL means derived from grant_privileges verbs. */
@@ -643,7 +643,7 @@ export interface ViewCompositeParams {
643643
}
644644
/**
645645
* ===========================================================================
646-
* Static structural types
646+
* Structural types — Static fallback (no _meta provided)
647647
* ===========================================================================
648648
*/
649649
;
@@ -663,7 +663,7 @@ export interface BlueprintField {
663663
/** An RLS policy entry for a blueprint table. */
664664
export interface BlueprintPolicy {
665665
/** Authz* policy type name (e.g., "AuthzDirectOwner", "AuthzAllowAll"). */
666-
$type: "AuthzDirectOwner" | "AuthzDirectOwnerAny" | "AuthzMembership" | "AuthzEntityMembership" | "AuthzRelatedEntityMembership" | "AuthzOrgHierarchy" | "AuthzTemporal" | "AuthzPublishable" | "AuthzMemberList" | "AuthzRelatedMemberList" | "AuthzAllowAll" | "AuthzDenyAll" | "AuthzComposite" | "AuthzPeerOwnership" | "AuthzRelatedPeerOwnership";
666+
policy_type: "AuthzDirectOwner" | "AuthzDirectOwnerAny" | "AuthzMembership" | "AuthzEntityMembership" | "AuthzRelatedEntityMembership" | "AuthzOrgHierarchy" | "AuthzTemporal" | "AuthzPublishable" | "AuthzMemberList" | "AuthzRelatedMemberList" | "AuthzAllowAll" | "AuthzDenyAll" | "AuthzComposite" | "AuthzPeerOwnership" | "AuthzRelatedPeerOwnership";
667667
/** Role for this policy. Defaults to "authenticated". */
668668
policy_role?: string;
669669
/** Whether this policy is permissive (true) or restrictive (false). */
@@ -697,9 +697,9 @@ export interface BlueprintFullTextSearch {
697697
export interface BlueprintIndex {
698698
/** Reference key of the table this index belongs to. */
699699
table_ref: string;
700-
/** Single column name for the index. Mutually exclusive with "columns". */
700+
/** Single column name for the index. */
701701
column?: string;
702-
/** Array of column names for a multi-column index. Mutually exclusive with "column". */
702+
/** Array of column names for a multi-column index. */
703703
columns?: string[];
704704
/** Index access method (e.g., "BTREE", "GIN", "GIST", "HNSW", "BM25"). */
705705
access_method: string;

graphile/node-type-registry/src/relation/relation-many-to-many.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ export const RelationManyToMany: NodeTypeDefinition = {
5858
},
5959
"grant_privileges": {
6060
"type": "array",
61-
"description": "Privilege grants for the junction table. Forwarded to secure_table_provision as-is. Default: select/insert/delete for all columns"
61+
"items": {
62+
"type": "array",
63+
"items": {
64+
"type": "string"
65+
}
66+
},
67+
"description": "Privilege grants for the junction table as [verb, columns] tuples (e.g. [['select','*'],['insert','*']]). Forwarded to secure_table_provision as-is. Default: select/insert/delete for all columns"
6268
},
6369
"policy_type": {
6470
"type": "string",

0 commit comments

Comments
 (0)