Skip to content

Commit

Permalink
Fix logic when detecting expired tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Nov 14, 2023
1 parent 0767361 commit 265a3f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ocm/invite/repository/json/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (m *manager) ListTokens(ctx context.Context, initiator *userpb.UserId) ([]*
}

func tokenIsExpired(token *invitepb.InviteToken) bool {
return token.Expiration != nil && token.Expiration.Seconds > uint64(time.Now().Unix())
return token.Expiration != nil && token.Expiration.Seconds < uint64(time.Now().Unix())
}

func (m *manager) AddRemoteUser(ctx context.Context, initiator *userpb.UserId, remoteUser *userpb.User) error {
Expand Down

0 comments on commit 265a3f8

Please sign in to comment.