Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Dec 31, 2024
1 parent bff847b commit cbca0d4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions flow/e2e/congen.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ func cleanPostgres(conn *pgx.Conn, suffix string) error {

func RevokePermissionForTableColumns(conn *pgx.Conn,
tableIdentifier string,
selectedColumns []string) error {
selectedColumns []string,
) error {
schemaTable, err := utils.ParseSchemaTable(tableIdentifier)
if err != nil {
return fmt.Errorf("failed to parse table identifier %s: %w", tableIdentifier, err)
Expand All @@ -76,7 +77,8 @@ func RevokePermissionForTableColumns(conn *pgx.Conn,

// 2. Grant SELECT permission on the columns
if _, err := conn.Exec(context.Background(),
fmt.Sprintf("GRANT SELECT (%s) ON %s.%s TO postgres", columnStr, schemaTable.Schema, schemaTable.Table)); err != nil {
fmt.Sprintf("GRANT SELECT (%s) ON %s.%s TO postgres",
columnStr, schemaTable.Schema, schemaTable.Table)); err != nil {
return fmt.Errorf("failed to grant SELECT permission on columns %s: %w", schemaTable.String(), err)
}

Expand Down

0 comments on commit cbca0d4

Please sign in to comment.