Skip to content

Commit

Permalink
fix: principal value supports group name (#626)
Browse files Browse the repository at this point in the history
* fix: principal value supports group name

* fix: principal value supports group name
  • Loading branch information
BarryTong65 authored May 28, 2024
1 parent e418737 commit 37eb89f
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 13 deletions.
4 changes: 3 additions & 1 deletion proto/greenfield/permission/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ enum PrincipalType {
message Principal {
PrincipalType type = 1;
// When the type is an account, its value is sdk.AccAddress().String();
// when the type is a group, its value is math.Uint().String()
// When the type is a group, its value can be in one of two formats:
// 1. group id
// 2. grn:g:ownerAddress:groupName
string value = 2;
}
55 changes: 44 additions & 11 deletions swagger/static/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5201,8 +5201,12 @@ paths:
When the type is an account, its value is
sdk.AccAddress().String();

when the type is a group, its value is
math.Uint().String()
When the type is a group, its value can be in one of
two formats:

1. group id

2. grn:g:ownerAddress:groupName
description: >-
Principal define the roles that can be grant permissions
to. Currently, it can be account or group.
Expand Down Expand Up @@ -5397,8 +5401,12 @@ paths:
When the type is an account, its value is
sdk.AccAddress().String();

when the type is a group, its value is
math.Uint().String()
When the type is a group, its value can be in one of
two formats:

1. group id

2. grn:g:ownerAddress:groupName
description: >-
Principal define the roles that can be grant permissions
to. Currently, it can be account or group.
Expand Down Expand Up @@ -5597,8 +5605,12 @@ paths:
When the type is an account, its value is
sdk.AccAddress().String();

when the type is a group, its value is
math.Uint().String()
When the type is a group, its value can be in one of
two formats:

1. group id

2. grn:g:ownerAddress:groupName
description: >-
Principal define the roles that can be grant permissions
to. Currently, it can be account or group.
Expand Down Expand Up @@ -34654,7 +34666,11 @@ definitions:
When the type is an account, its value is
sdk.AccAddress().String();

when the type is a group, its value is math.Uint().String()
When the type is a group, its value can be in one of two formats:

1. group id

2. grn:g:ownerAddress:groupName
description: >-
Principal define the roles that can be grant permissions to.
Currently, it can be account or group.
Expand Down Expand Up @@ -34784,7 +34800,9 @@ definitions:
type: string
title: |-
When the type is an account, its value is sdk.AccAddress().String();
when the type is a group, its value is math.Uint().String()
When the type is a group, its value can be in one of two formats:
1. group id
2. grn:g:ownerAddress:groupName
description: >-
Principal define the roles that can be grant permissions to. Currently, it
can be account or group.
Expand Down Expand Up @@ -36657,7 +36675,12 @@ definitions:
When the type is an account, its value is
sdk.AccAddress().String();

when the type is a group, its value is math.Uint().String()
When the type is a group, its value can be in one of two
formats:

1. group id

2. grn:g:ownerAddress:groupName
description: >-
Principal define the roles that can be grant permissions to.
Currently, it can be account or group.
Expand Down Expand Up @@ -36811,7 +36834,12 @@ definitions:
When the type is an account, its value is
sdk.AccAddress().String();

when the type is a group, its value is math.Uint().String()
When the type is a group, its value can be in one of two
formats:

1. group id

2. grn:g:ownerAddress:groupName
description: >-
Principal define the roles that can be grant permissions to.
Currently, it can be account or group.
Expand Down Expand Up @@ -36965,7 +36993,12 @@ definitions:
When the type is an account, its value is
sdk.AccAddress().String();

when the type is a group, its value is math.Uint().String()
When the type is a group, its value can be in one of two
formats:

1. group id

2. grn:g:ownerAddress:groupName
description: >-
Principal define the roles that can be grant permissions to.
Currently, it can be account or group.
Expand Down
4 changes: 3 additions & 1 deletion x/permission/types/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 37eb89f

Please sign in to comment.