Skip to content

Commit

Permalink
fix: avoid direct access to proto field perms.Account and `perms.Pe…
Browse files Browse the repository at this point in the history
…rmissions` (#4552)

* avoid direct access to proto field `perms.Account` and `perms.Permissions`

* add changelog
  • Loading branch information
Pantani authored Mar 3, 2025
1 parent 0ed70f6 commit c7a4bc2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
- [#4091](https://github.com/ignite/cli/pull/4091) Fix race conditions in the plugin logic
- [#4128](https://github.com/ignite/cli/pull/4128) Check for duplicate proto fields in config
- [#4402](https://github.com/ignite/cli/pull/4402) Fix gentx parser into the cosmosutil package
- [#4552](https://github.com/ignite/cli/pull/4552) Avoid direct access to proto field `perms.Account` and `perms.Permissions`

## [`v28.8.1`](https://github.com/ignite/cli/releases/tag/v28.8.1)

Expand Down
2 changes: 1 addition & 1 deletion ignite/templates/app/files-minimal/app/app.go.plush
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig
func GetMaccPerms() map[string][]string {
dup := make(map[string][]string)
for _, perms := range moduleAccPerms {
dup[perms.Account] = perms.Permissions
dup[perms.GetAccount()] = perms.GetPermissions()
}

return dup
Expand Down
2 changes: 1 addition & 1 deletion ignite/templates/app/files/app/app.go.plush
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig
func GetMaccPerms() map[string][]string {
dup := make(map[string][]string)
for _, perms := range moduleAccPerms {
dup[perms.Account] = perms.Permissions
dup[perms.GetAccount()] = perms.GetPermissions()
}

return dup
Expand Down

0 comments on commit c7a4bc2

Please sign in to comment.