fix: Correctly allow sharees to test credential when opening the modal (#6111)
* fix: Prevent incorrect error message when sharee opens a credential * test: Add testing for automated credential testing * chore: Remove unnecessary comments
This commit is contained in:
@@ -58,6 +58,7 @@
|
||||
:buttonTitle="$locale.baseText('credentialEdit.credentialConfig.retryCredentialTest')"
|
||||
:buttonLoading="isRetesting"
|
||||
@click="$emit('retest')"
|
||||
data-test-id="credentials-config-container-test-success"
|
||||
/>
|
||||
|
||||
<template v-if="credentialPermissions.updateConnection">
|
||||
|
||||
@@ -256,7 +256,9 @@ export default mixins(showMessage, nodeHelpers).extend({
|
||||
|
||||
setTimeout(() => {
|
||||
if (this.credentialId) {
|
||||
if (!this.requiredPropertiesFilled) {
|
||||
if (!this.requiredPropertiesFilled && this.credentialPermissions.isOwner === true) {
|
||||
// sharees can't see properties, so this check would always fail for them
|
||||
// if the credential contains required fields.
|
||||
this.showValidationWarning = true;
|
||||
} else {
|
||||
this.retestCredential();
|
||||
@@ -347,6 +349,10 @@ export default mixins(showMessage, nodeHelpers).extend({
|
||||
};
|
||||
},
|
||||
isCredentialTestable(): boolean {
|
||||
// Sharees can always test since they can't see the data.
|
||||
if (this.credentialPermissions.isOwner === false) {
|
||||
return true;
|
||||
}
|
||||
if (this.isOAuthType || !this.requiredPropertiesFilled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user