mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
feat: Allow instance owners and admins to edit all credentials (#8716)
Co-authored-by: Danny Martini <despair.blue@gmail.com>
This commit is contained in:
@@ -74,7 +74,9 @@ export class CredentialsController {
|
||||
|
||||
credential = this.ownershipService.addOwnedByAndSharedWith(credential);
|
||||
|
||||
if (!includeDecryptedData || !userSharing || userSharing.role !== 'credential:owner') {
|
||||
// Below, if `userSharing` does not exist, it means this credential is being
|
||||
// fetched by the instance owner or an admin. In this case, they get the full data
|
||||
if (!includeDecryptedData || userSharing?.role === 'credential:user') {
|
||||
const { data: _, ...rest } = credential;
|
||||
return { ...rest };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user