Before adding
or using
these modules, a listener is called to verify their protection status. This ensures that only authorized actions can access or modify these protected items, maintaining security and control over sensitive modules within the system.mailui.init({
protectedModules: ["countdown"]
});
mailui.addEventListener(
"protectedModules:verifyAccess",
async (params: {module: string}, done: Function) => {
// Check module access
if (params.module === 'moduleName') {
done(false); // return false | true
}
}
);