Skip to content

Commit

Permalink
fix: cherrypicked commits #285 #295 (#335)
Browse files Browse the repository at this point in the history
* fix: ACTION_UPDATE_OBJECT_INFO not allowed to be used on object's bug (#285)

(cherry picked from commit 0899864)

* add missing field to event (#295)

(cherry picked from commit 1948733)

---------

Co-authored-by: Chris Li <[email protected]>
Co-authored-by: Alexxxxxx <[email protected]>
  • Loading branch information
3 people committed Jul 11, 2023
1 parent ec8bc06 commit e4146e0
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 127 deletions.
2 changes: 1 addition & 1 deletion proto/greenfield/storage/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ message MsgUpdateGroupExtra {
// group_name defines the name of the group which to be updated
string group_name = 3;
// extra defines extra info for the group to update
string Extra = 4;
string extra = 4;
}

message MsgUpdateGroupExtraResponse {}
Expand Down
13 changes: 7 additions & 6 deletions x/permission/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ var (
ACTION_TYPE_ALL: true,
}
ObjectAllowedActions = map[ActionType]bool{
ACTION_CREATE_OBJECT: true,
ACTION_DELETE_OBJECT: true,
ACTION_GET_OBJECT: true,
ACTION_COPY_OBJECT: true,
ACTION_EXECUTE_OBJECT: true,
ACTION_LIST_OBJECT: true,
ACTION_UPDATE_OBJECT_INFO: true,
ACTION_CREATE_OBJECT: true,
ACTION_DELETE_OBJECT: true,
ACTION_GET_OBJECT: true,
ACTION_COPY_OBJECT: true,
ACTION_EXECUTE_OBJECT: true,
ACTION_LIST_OBJECT: true,

ACTION_TYPE_ALL: true,
}
Expand Down
2 changes: 2 additions & 0 deletions x/storage/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,7 @@ func (k Keeper) UpdateObjectInfo(ctx sdk.Context, operator sdk.AccAddress, bucke
BucketName: bucketName,
ObjectName: objectName,
Visibility: visibility,
ObjectId: objectInfo.Id,
}); err != nil {
return err
}
Expand Down Expand Up @@ -1119,6 +1120,7 @@ func (k Keeper) CreateGroup(
GroupId: groupInfo.Id,
SourceType: groupInfo.SourceType,
Members: opts.Members,
Extra: opts.Extra,
}); err != nil {
return sdkmath.ZeroUint(), err
}
Expand Down
Loading

0 comments on commit e4146e0

Please sign in to comment.