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

fix: principal value supports group name #626

Merged
merged 2 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading