adminizer 4.3.0-build.86 → 4.3.0-build.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,7 +22,9 @@ export class FormHelper {
22
22
  }
23
23
  let form = path.basename(formJson, '.json');
24
24
  try {
25
- adminizer.config.forms.data[form] = require(`${formsDirectoryPath}/${formJson}`);
25
+ const filePath = path.join(formsDirectoryPath, formJson);
26
+ const fileContent = fs.readFileSync(filePath, 'utf-8');
27
+ adminizer.config.forms.data[form] = JSON.parse(fileContent);
26
28
  }
27
29
  catch (error) {
28
30
  Adminizer.log.error(`Adminpanel > Error when reading ${formJson}: ${error}`);
@@ -26,6 +26,9 @@ export class GeneralNotificationService extends AbstractNotificationService {
26
26
  if (this.adminizer.accessRightsHelper.hasPermission(`notification-${this.notificationClass}`, user)) {
27
27
  await this.createUserNotification(notificationDB.id, user.id);
28
28
  }
29
+ else {
30
+ Adminizer.log.error(`[${this.notificationClass}] User ${user.id} doesn't have permission to receive this notification`);
31
+ }
29
32
  }
30
33
  catch (error) {
31
34
  Adminizer.log.error('Error creating UserNotificationAP:', error);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adminizer",
3
3
  "type": "module",
4
- "version": "4.3.0-build.86",
4
+ "version": "4.3.0-build.87",
5
5
  "main": "index.js",
6
6
  "exports": {
7
7
  ".": "./index.js",