fix(editor): Show credential share info only to appropriate users (#8020)

## Summary
The credential owner should not see the sharing info box


![image](https://github.com/n8n-io/n8n/assets/5410822/d85b47f8-f4cf-4009-beaf-03bc62008feb)
This commit is contained in:
Csaba Tuncsik
2023-12-14 11:48:51 +01:00
committed by GitHub
parent ce1ae6a7c0
commit b29b4d442b
3 changed files with 14 additions and 3 deletions

View File

@@ -131,7 +131,7 @@ describe('Sharing', { disableAutoLogin: true }, () => {
credentialsModal.getters.testSuccessTag().should('be.visible');
});
it.only('should work for admin role on credentials created by others (also can share it with themselves)', () => {
it('should work for admin role on credentials created by others (also can share it with themselves)', () => {
cy.signin(INSTANCE_MEMBERS[0]);
cy.visit(credentialsPage.url);
@@ -150,6 +150,9 @@ describe('Sharing', { disableAutoLogin: true }, () => {
credentialsModal.getters.testSuccessTag().should('be.visible');
cy.get('input').should('not.have.length');
credentialsModal.actions.changeTab('Sharing');
cy.contains(
'You can view this credential because you have permission to read and share',
).should('be.visible');
credentialsModal.getters.usersSelect().click();
cy.getByTestId('user-email')