Skip to content

Commit

Permalink
fix: correct the VerifyPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
j75689 committed Aug 8, 2023
1 parent fa68f86 commit 94a78fb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions x/permission/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,7 @@ func (k Keeper) VerifyPolicy(ctx sdk.Context, resourceID math.Uint, resourceType
if effect != types.EFFECT_UNSPECIFIED {
// check the operator is the member of this group
groupMember, memberFound := k.GetGroupMember(ctx, item.GroupId, operator)
if memberFound {
// check if the operator has not been expired
if groupMember.ExpirationTime.Before(ctx.BlockTime()) {
return types.EFFECT_DENY
}
if memberFound && groupMember.ExpirationTime.After(ctx.BlockTime()) {
// check if the operator has been revoked
if effect == types.EFFECT_ALLOW {
allowed = true
Expand Down

0 comments on commit 94a78fb

Please sign in to comment.