Skip to content

Commit

Permalink
fix: verify permission if expiration time = 0 bug (#1093)
Browse files Browse the repository at this point in the history
  • Loading branch information
BarryTong65 authored Sep 1, 2023
1 parent 56468bc commit 8c68edc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modular/metadata/metadata_permission_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ func (r *MetadataModular) VerifyPolicy(ctx context.Context, resourceID math.Uint
var filteredGroups []*bsdb.Group
// filter the group member if they are expired
for _, group := range groups {
if time.Unix(group.ExpirationTime, 0).After(time.Now()) {
if group.ExpirationTime == 0 || time.Unix(group.ExpirationTime, 0).After(time.Now()) {
filteredGroups = append(filteredGroups, group)
}
}
Expand Down

0 comments on commit 8c68edc

Please sign in to comment.