Skip to content

Commit

Permalink
Add option in UI to manage ISV credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
WangLiNaruto committed Nov 7, 2023
1 parent 32223e4 commit fd78e31
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package org.eclipse.xpanse.modules.credential.cache;

import org.apache.commons.lang3.StringUtils;
import org.eclipse.xpanse.modules.models.credential.enums.CredentialType;
import org.eclipse.xpanse.modules.models.service.common.enums.Csp;

Expand All @@ -19,10 +20,15 @@ public record CredentialCacheKey(Csp csp,
@Override
public boolean equals(Object obj) {
if (obj instanceof CredentialCacheKey key) {
return key.csp == this.csp
&& key.credentialType == this.credentialType
&& key.credentialName.equals(this.credentialName)
&& key.userId.equals(this.userId);
return StringUtils.isBlank(userId)
?
key.csp == this.csp
&& key.credentialType == this.credentialType
&& key.credentialName.equals(this.credentialName)
: key.csp == this.csp
&& key.credentialType == this.credentialType
&& key.credentialName.equals(this.credentialName)
&& key.userId.equals(this.userId);
} else {
return false;
}
Expand Down

0 comments on commit fd78e31

Please sign in to comment.