Skip to content

Commit

Permalink
feat: revoke grant extras
Browse files Browse the repository at this point in the history
  • Loading branch information
mul14 committed Sep 24, 2024
1 parent 0770271 commit 8369882
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/supabase/query/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,12 @@ func BuildUpdateRoleQuery(newRole objects.Role, updateRoleParam objects.UpdateRo
}

func BuildDeleteRoleQuery(role objects.Role) string {
return fmt.Sprintf("DROP ROLE %s;", role.Name)
return fmt.Sprintf(`
REVOKE %s FROM authenticator;
REVOKE anon FROM %s;
DROP ROLE %s;`,
role.Name,
role.Name,
role.Name,
)
}

0 comments on commit 8369882

Please sign in to comment.