MinifiedUserUpdatedEvent.ts 572 B

123456789101112131415
  1. import ModelUpdatedEvent from "@/modules/DataModule/ModelUpdatedEvent";
  2. import isAdmin from "@/modules/DataModule/permissions/isAdmin";
  3. import doesModelExist from "@/modules/DataModule/permissions/modelPermissions/doesModelExist";
  4. export default abstract class MinifiedUserUpdatedEvent extends ModelUpdatedEvent {
  5. protected static _modelName = "minifiedUsers";
  6. protected static _hasPermission = isAdmin;
  7. /**
  8. * If a modelId was specified, any user can subscribe.
  9. * If not, only admins can subscribe.
  10. */
  11. protected static _hasModelPermission = doesModelExist;
  12. }