Skip to content

Commit

Permalink
add more check for message
Browse files Browse the repository at this point in the history
  • Loading branch information
fynnss committed Mar 17, 2023
1 parent 17380dc commit 97dd763
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/permission/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ func (s *Statement) Eval(action ActionType, opts *VerifyOptions) (Effect, *State
}

func (s *Statement) ValidateBasic(resType resource.ResourceType) error {
if s.Effect == EFFECT_PASS {
return ErrInvalidStatement.Wrap("Not allowed to set EFFECT_PASS.")
}
switch resType {
case resource.RESOURCE_TYPE_BUCKET:
containsCreateObject := false
Expand Down

0 comments on commit 97dd763

Please sign in to comment.