Skip to content

Commit

Permalink
Remove signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
Gijsdeman committed Dec 1, 2023
1 parent 8cf77fb commit b94fa63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ async function synchronizeUserACL(activeDirectoryUser: ActiveDirectoryUser, perm
attributes: ['memberFlattened'],
})).searchEntries[0] as unknown as ActiveDirectoryUser;

console.log(activeDirectoryPermissionGroup)
console.log(activeDirectoryUser);

await updateLocalUserPermissions(activeDirectoryUser.mail, activeDirectoryPermissionGroup.memberFlattened, permission)
.then(async (changedUsers: ChangedUsers) => {
Expand Down Expand Up @@ -467,7 +467,7 @@ async function synchronizePermissionsWithActiveDirectory(): Promise<void> {
console.log(`Changing SOB of ${activeDirectoryUser.email}`);
const SOBs: string[] = activeDirectoryUser.mailPermSOB.split(';');
await editMailcowUser(activeDirectoryUser.email, { sender_acl: SOBs });
await editUserSignatures(activeDirectoryUser, SOBs);
// await editUserSignatures(activeDirectoryUser, SOBs);
} catch (error) {
console.log(`Ran into an issue when syncing send on behalf of ${activeDirectoryUser.email}. \n\n ${error}`);
}
Expand Down
12 changes: 6 additions & 6 deletions src/mailcowDatabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ export async function editUserSignatures(user: Users, SOBs: string[]): Promise<v
let defaultSettings: Defaults = JSON.parse(userProfile.c_defaults);
let newIdentities: SOGoMailIdentity[] = [];

console.log(defaultSettings.SOGoMailIdentities);
for (let identity of defaultSettings.SOGoMailIdentities) {
if (identity.signature.indexOf('class="autogenerated"') === -1) {
newIdentities.push(identity);
}
}
// console.log(defaultSettings.SOGoMailIdentities);
// for (let identity of defaultSettings.SOGoMailIdentities) {
// if (identity.signature.indexOf('class="autogenerated"') === -1) {
// newIdentities.push(identity);
// }
// }

for (let identityMail of SOBs) {
const committeeDisplayName: string = await getActiveDirectoryDisplayName(identityMail);
Expand Down

0 comments on commit b94fa63

Please sign in to comment.