Skip to content

Commit

Permalink
fix: improve Hasura permissions (forbole#473)
Browse files Browse the repository at this point in the history
Closes: #XXXX

---

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch
- [ ] provided a link to the relevant issue or specification
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
  • Loading branch information
MonikaCat authored and ankurdotb committed Nov 1, 2022
1 parent 663d6ec commit 99783a0
Show file tree
Hide file tree
Showing 42 changed files with 82 additions and 98 deletions.
3 changes: 2 additions & 1 deletion hasura/metadata/databases/bdjuno/tables/public_account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ array_relationships:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- address
filter: {}
limit: 100
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ table:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- average_time
- height
filter: {}
limit: 1
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ table:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- average_time
- height
filter: {}
limit: 1
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ table:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- average_time
- height
filter: {}
limit: 1
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ table:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- average_time
- height
filter: {}
limit: 1
role: anonymous
3 changes: 2 additions & 1 deletion hasura/metadata/databases/bdjuno/tables/public_block.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ array_relationships:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- num_txs
- height
Expand All @@ -60,4 +60,5 @@ select_permissions:
- proposer_address
- timestamp
filter: {}
limit: 100
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ table:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- coins
- height
filter: {}
limit: 1
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ table:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- one_row_id
- params
- height
filter: {}
limit: 1
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,11 @@ object_relationships:
foreign_key_constraint_on: vote_b_id
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- height
- vote_a_id
- vote_b_id
filter: {}
limit: 100
role: anonymous
- permission:
allow_aggregations: true
columns:
- height
- vote_a_id
- vote_b_id
filter: {}
role: client
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ array_relationships:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- id
- type
- height
- round
Expand All @@ -33,17 +32,5 @@ select_permissions:
- validator_index
- signature
filter: {}
limit: 100
role: anonymous
- permission:
allow_aggregations: true
columns:
- id
- type
- height
- round
- block_id
- validator_address
- validator_index
- signature
filter: {}
role: client
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ object_relationships:
foreign_key_constraint_on: granter_address
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- id
- grantee_address
- granter_address
- allowance
- height
filter: {}
limit: 100
role: anonymous
13 changes: 3 additions & 10 deletions hasura/metadata/databases/bdjuno/tables/public_genesis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,11 @@ table:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- chain_id
- initial_height
- time
filter: {}
role: anonymous
- permission:
allow_aggregations: true
columns:
- chain_id
- one_row_id
- time
filter: {}
role: client
limit: 1
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ table:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- one_row_id
- deposit_params
- voting_params
- tally_params
- height
filter: {}
limit: 1
role: anonymous
9 changes: 2 additions & 7 deletions hasura/metadata/databases/bdjuno/tables/public_inflation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@ table:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- value
- height
filter: {}
limit: 1
role: anonymous
- permission:
allow_aggregations: true
columns:
- height
filter: {}
role: client
4 changes: 2 additions & 2 deletions hasura/metadata/databases/bdjuno/tables/public_message.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ object_relationships:
transaction_hash: hash
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- transaction_hash
- index
- type
- value
- involved_accounts_addresses
- partition_id
- height
filter: {}
limit: 100
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ table:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- one_row_id
- params
- height
filter: {}
limit: 1
role: anonymous
3 changes: 2 additions & 1 deletion hasura/metadata/databases/bdjuno/tables/public_modules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ table:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- module_name
filter: {}
limit: 100
role: anonymous
13 changes: 2 additions & 11 deletions hasura/metadata/databases/bdjuno/tables/public_pre_commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,5 @@ select_permissions:
- voting_power
- proposer_priority
filter: {}
role: anonymous
- permission:
allow_aggregations: true
columns:
- validator_address
- height
- timestamp
- voting_power
- proposer_priority
filter: {}
role: client
limit: 100
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,5 @@ select_permissions:
- status
- content
filter: {}
limit: 100
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ object_relationships:
foreign_key_constraint_on: proposal_id
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- proposal_id
- depositor_address
- amount
- height
filter: {}
limit: 100
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ object_relationships:
foreign_key_constraint_on: proposal_id
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- proposal_id
- bonded_tokens
- not_bonded_tokens
- height
filter: {}
limit: 100
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ object_relationships:
foreign_key_constraint_on: proposal_id
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- proposal_id
- yes
Expand All @@ -16,4 +16,5 @@ select_permissions:
- no_with_veto
- height
filter: {}
limit: 100
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ object_relationships:
foreign_key_constraint_on: validator_address
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- id
- proposal_id
- validator_address
- voting_power
- status
- jailed
- height
filter: {}
limit: 100
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ object_relationships:
foreign_key_constraint_on: proposal_id
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- proposal_id
- voter_address
- option
- height
filter: {}
limit: 100
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ table:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- one_row_id
- params
- height
filter: {}
limit: 1
role: anonymous
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ table:
schema: public
select_permissions:
- permission:
allow_aggregations: true
allow_aggregations: false
columns:
- one_row_id
- params
- height
filter: {}
limit: 1
role: anonymous
Loading

0 comments on commit 99783a0

Please sign in to comment.