Skip to content

Commit c7a4bc2

Browse files
authored
fix: avoid direct access to proto field perms.Account and perms.Permissions (#4552)
* avoid direct access to proto field `perms.Account` and `perms.Permissions` * add changelog
1 parent 0ed70f6 commit c7a4bc2

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
- [#4091](https://github.com/ignite/cli/pull/4091) Fix race conditions in the plugin logic
5959
- [#4128](https://github.com/ignite/cli/pull/4128) Check for duplicate proto fields in config
6060
- [#4402](https://github.com/ignite/cli/pull/4402) Fix gentx parser into the cosmosutil package
61+
- [#4552](https://github.com/ignite/cli/pull/4552) Avoid direct access to proto field `perms.Account` and `perms.Permissions`
6162

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

ignite/templates/app/files-minimal/app/app.go.plush

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig
218218
func GetMaccPerms() map[string][]string {
219219
dup := make(map[string][]string)
220220
for _, perms := range moduleAccPerms {
221-
dup[perms.Account] = perms.Permissions
221+
dup[perms.GetAccount()] = perms.GetPermissions()
222222
}
223223

224224
return dup

ignite/templates/app/files/app/app.go.plush

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig
275275
func GetMaccPerms() map[string][]string {
276276
dup := make(map[string][]string)
277277
for _, perms := range moduleAccPerms {
278-
dup[perms.Account] = perms.Permissions
278+
dup[perms.GetAccount()] = perms.GetPermissions()
279279
}
280280

281281
return dup

0 commit comments

Comments
 (0)