Skip to content

Commit 54cfa22

Browse files
fix
1 parent 309c89c commit 54cfa22

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

codefresh/cfclient/context.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,15 @@ func (client *Client) GetContext(name string) (*Context, error) {
7070
return nil, err
7171
}
7272

73+
// This is so not to break existing behavior while adding support for forbidDecrypt feature flag
74+
// The provider used to always decrypt the contexts, hence we treat all contexts as decrypted unless forbidDecrypt is set
7375
isEncryptedType := slices.Contains(encryptedContextTypes, respContext.Spec.Type)
74-
respContext.IsEncrypred = isEncryptedType && !forbidDecrypt
76+
77+
respContext.IsEncrypred = false
78+
79+
if forbidDecrypt && isEncryptedType {
80+
respContext.IsEncrypred = true
81+
}
7582

7683
return &respContext, nil
7784
}

0 commit comments

Comments
 (0)