diff --git a/codefresh/cfclient/context.go b/codefresh/cfclient/context.go index 9b1f0e8..4a29dec 100644 --- a/codefresh/cfclient/context.go +++ b/codefresh/cfclient/context.go @@ -70,8 +70,15 @@ func (client *Client) GetContext(name string) (*Context, error) { return nil, err } + // This is so not to break existing behavior while adding support for forbidDecrypt feature flag + // The provider used to always decrypt the contexts, hence we treat all contexts as decrypted unless forbidDecrypt is set isEncryptedType := slices.Contains(encryptedContextTypes, respContext.Spec.Type) - respContext.IsEncrypred = isEncryptedType && !forbidDecrypt + + respContext.IsEncrypred = false + + if forbidDecrypt && isEncryptedType { + respContext.IsEncrypred = true + } return &respContext, nil }