Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/auth: update NewAccountKeeper docs #9020

Merged
merged 5 commits into from
Mar 30, 2021
Merged

x/auth: update NewAccountKeeper docs #9020

merged 5 commits into from
Mar 30, 2021

Conversation

robert-zaremba
Copy link
Collaborator

Description

Updates documentation about maccPerms parameter for NewAccountKeeper


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

// `maccPerms` is a map of module account to list of permissisons. It's used to construct
// types.PermissionsForAddress and used in keeper.ValidatePermissions. Permissions is a string,
// without any specific structure. It's not use internally by this module (x/auth) but may
// be used by other modules using auth.Keeper to check against configured permissions.
func NewAccountKeeper(
cdc codec.BinaryMarshaler, key sdk.StoreKey, paramstore paramtypes.Subspace, proto func() types.AccountI,
maccPerms map[string][]string,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking to change the maccPerms type to map[string]types.PermissionsForAddress, but that would add redundancy when creating the parameters: PermissionsForAddress repeats the module name (the map key) in it's attributes.

@orijbot
Copy link

orijbot commented Mar 29, 2021

@orijbot
Copy link

orijbot commented Mar 29, 2021

Copy link
Contributor

@barriebyron barriebyron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know these are comments, lmk if this is useful

x/auth/keeper/keeper.go Outdated Show resolved Hide resolved
Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>
@orijbot
Copy link

orijbot commented Mar 30, 2021

@orijbot
Copy link

orijbot commented Mar 30, 2021

@robert-zaremba robert-zaremba added the T:Docs Changes and features related to documentation. label Mar 30, 2021
x/auth/keeper/keeper.go Outdated Show resolved Hide resolved
x/auth/keeper/keeper.go Outdated Show resolved Hide resolved
x/auth/keeper/keeper.go Outdated Show resolved Hide resolved
x/auth/keeper/keeper.go Outdated Show resolved Hide resolved
Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@robert-zaremba robert-zaremba added the A:automerge Automatically merge PR once all prerequisites pass. label Mar 30, 2021
mergify bot and others added 2 commits March 30, 2021 10:39
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
@robert-zaremba robert-zaremba removed the A:automerge Automatically merge PR once all prerequisites pass. label Mar 30, 2021
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
@robert-zaremba
Copy link
Collaborator Author

@barriebyron , @alessio - thanks for suggestions.

@robert-zaremba robert-zaremba added the A:automerge Automatically merge PR once all prerequisites pass. label Mar 30, 2021
@mergify mergify bot merged commit f8f52c6 into master Mar 30, 2021
@mergify mergify bot deleted the robert/new-keeper-docs branch March 30, 2021 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. T:Docs Changes and features related to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants