@intelact/bright 0.9.178 → 0.9.180

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/lib/author/author.model.d.ts +1 -1
  2. package/lib/author/author.model.js +4 -4
  3. package/lib/boost/boost.model.d.ts +1 -1
  4. package/lib/boost/boost.model.js +16 -16
  5. package/lib/brand/brand.model.d.ts +1 -1
  6. package/lib/brand/brand.model.js +4 -4
  7. package/lib/category/category.model.d.ts +1 -1
  8. package/lib/category/category.model.js +4 -4
  9. package/lib/collection/collection.model.d.ts +1 -1
  10. package/lib/collection/collection.model.js +4 -4
  11. package/lib/feedback/feedback-item.model.d.ts +1 -1
  12. package/lib/feedback/feedback-item.model.js +8 -8
  13. package/lib/feedback/feedback.model.d.ts +1 -1
  14. package/lib/feedback/feedback.model.js +6 -6
  15. package/lib/post/post.model.d.ts +1 -1
  16. package/lib/post/post.model.js +48 -48
  17. package/lib/promotion/promotion.model.d.ts +1 -1
  18. package/lib/promotion/promotion.model.js +17 -17
  19. package/lib/publisher/publisher.model.d.ts +1 -1
  20. package/lib/publisher/publisher.model.js +19 -19
  21. package/lib/question/comment.model.d.ts +1 -1
  22. package/lib/question/comment.model.js +8 -8
  23. package/lib/question/comment.model.js.map +1 -1
  24. package/lib/question/question.model.d.ts +1 -3
  25. package/lib/question/question.model.js +6 -12
  26. package/lib/question/question.model.js.map +1 -1
  27. package/lib/quote/quote.model.d.ts +1 -1
  28. package/lib/quote/quote.model.js +4 -4
  29. package/lib/survey/survey.model.d.ts +1 -1
  30. package/lib/survey/survey.model.js +18 -18
  31. package/lib/topic/topic.model.d.ts +1 -1
  32. package/lib/topic/topic.model.js +4 -4
  33. package/lib/tsconfig.tsbuildinfo +1 -1
  34. package/lib/user/user.model.d.ts +1 -1
  35. package/lib/user/user.model.js +18 -17
  36. package/lib/user/user.model.js.map +1 -1
  37. package/package.json +1 -1
@@ -16,7 +16,7 @@ export declare class Author {
16
16
  createdOn: Date;
17
17
  updatedBy: User;
18
18
  updatedOn: Date;
19
- authorisation: {
19
+ authorization: {
20
20
  manage: boolean;
21
21
  merge: boolean;
22
22
  };
@@ -31,7 +31,7 @@ class Author {
31
31
  createdOn;
32
32
  updatedBy;
33
33
  updatedOn;
34
- authorisation = {
34
+ authorization = {
35
35
  manage: false,
36
36
  merge: false,
37
37
  };
@@ -59,8 +59,8 @@ class Author {
59
59
  return data ? (0, class_transformer_1.plainToInstance)(Author, data, { groups: groups || [] }) : [];
60
60
  }
61
61
  authorize(user) {
62
- this.authorisation.manage = user?.hasPermission(security_1.Permission.AuthorManage);
63
- this.authorisation.merge = user?.hasPermission(security_1.Permission.AuthorMerge);
62
+ this.authorization.manage = user?.hasPermission(security_1.Permission.AuthorManage);
63
+ this.authorization.merge = user?.hasPermission(security_1.Permission.AuthorMerge);
64
64
  }
65
65
  }
66
66
  exports.Author = Author;
@@ -123,7 +123,7 @@ __decorate([
123
123
  __decorate([
124
124
  (0, class_transformer_1.Expose)({ groups: ['admin'] }),
125
125
  __metadata("design:type", Object)
126
- ], Author.prototype, "authorisation", void 0);
126
+ ], Author.prototype, "authorization", void 0);
127
127
  __decorate([
128
128
  (0, class_transformer_1.Expose)({ groups: ['admin'] }),
129
129
  __metadata("design:type", Function),
@@ -17,7 +17,7 @@ export declare class Boost {
17
17
  createdOn: Date;
18
18
  updatedBy: User;
19
19
  updatedOn: Date;
20
- authorisation: {
20
+ authorization: {
21
21
  edit: boolean;
22
22
  publish: boolean;
23
23
  unpublish: boolean;
@@ -35,7 +35,7 @@ let Boost = Boost_1 = class Boost {
35
35
  createdOn;
36
36
  updatedBy;
37
37
  updatedOn;
38
- authorisation = {
38
+ authorization = {
39
39
  edit: false,
40
40
  publish: false,
41
41
  unpublish: false,
@@ -66,11 +66,11 @@ let Boost = Boost_1 = class Boost {
66
66
  return this?.metrics?.find(i => i.event === user_1.UserEvent.Download);
67
67
  }
68
68
  authorize(user) {
69
- this.authorisation.edit = false;
70
- this.authorisation.delete = false;
71
- this.authorisation.publish = false;
72
- this.authorisation.unpublish = false;
73
- this.authorisation.end = false;
69
+ this.authorization.edit = false;
70
+ this.authorization.delete = false;
71
+ this.authorization.publish = false;
72
+ this.authorization.unpublish = false;
73
+ this.authorization.end = false;
74
74
  this.setLabel();
75
75
  if (!user?.isBrandUser()) {
76
76
  return;
@@ -84,15 +84,15 @@ let Boost = Boost_1 = class Boost {
84
84
  const isPublished = this.status === common_1.StatusType.Published;
85
85
  const isLive = this.label === common_1.StatusLabel.Live;
86
86
  if (isDraft) {
87
- this.authorisation.edit = !isEnded && canManage;
88
- this.authorisation.delete = !isEnded && canManage;
89
- this.authorisation.publish = !isExpired && !isEnded && canPublish;
87
+ this.authorization.edit = !isEnded && canManage;
88
+ this.authorization.delete = !isEnded && canManage;
89
+ this.authorization.publish = !isExpired && !isEnded && canPublish;
90
90
  }
91
91
  if (isPublished && isUpcoming) {
92
- this.authorisation.unpublish = canPublish;
92
+ this.authorization.unpublish = canPublish;
93
93
  }
94
94
  if (isPublished && isLive) {
95
- this.authorisation.end = canPublish;
95
+ this.authorization.end = canPublish;
96
96
  }
97
97
  }
98
98
  setValidators() {
@@ -121,7 +121,7 @@ let Boost = Boost_1 = class Boost {
121
121
  if (!this.validators) {
122
122
  this.setValidators();
123
123
  }
124
- this.authorisation.isValid = true;
124
+ this.authorization.isValid = true;
125
125
  this.validators = this.validators.map(i => {
126
126
  i.value = true;
127
127
  return i;
@@ -130,17 +130,17 @@ let Boost = Boost_1 = class Boost {
130
130
  if (!this.title || this.title.trim().length === 0) {
131
131
  validator = this.validators?.find(i => i.name === 'title');
132
132
  validator.value = false;
133
- this.authorisation.isValid = false;
133
+ this.authorization.isValid = false;
134
134
  }
135
135
  if (!this.startDate || !this.endDate) {
136
136
  validator = this.validators?.find(i => i.name === 'period');
137
137
  validator.value = false;
138
- this.authorisation.isValid = false;
138
+ this.authorization.isValid = false;
139
139
  }
140
140
  if (!this.items || this.items.length === 0) {
141
141
  validator = this.validators?.find(i => i.name === 'items');
142
142
  validator.value = false;
143
- this.authorisation.isValid = false;
143
+ this.authorization.isValid = false;
144
144
  }
145
145
  }
146
146
  setLabel() {
@@ -240,7 +240,7 @@ __decorate([
240
240
  __decorate([
241
241
  (0, class_transformer_1.Expose)({ groups: ['admin'] }),
242
242
  __metadata("design:type", Object)
243
- ], Boost.prototype, "authorisation", void 0);
243
+ ], Boost.prototype, "authorization", void 0);
244
244
  __decorate([
245
245
  (0, class_transformer_1.Expose)({ groups: ['admin'] }),
246
246
  (0, class_transformer_1.Type)(() => item_1.Item),
@@ -28,7 +28,7 @@ export declare class Brand {
28
28
  contactEmail: string;
29
29
  settings: BrandSetting[];
30
30
  publishers: Publisher[];
31
- authorisation: {
31
+ authorization: {
32
32
  manage: boolean;
33
33
  };
34
34
  constructor(props?: Partial<Brand>);
@@ -41,7 +41,7 @@ class Brand {
41
41
  contactEmail;
42
42
  settings;
43
43
  publishers;
44
- authorisation = {
44
+ authorization = {
45
45
  manage: false
46
46
  };
47
47
  constructor(props) {
@@ -140,11 +140,11 @@ class Brand {
140
140
  return data ? (0, class_transformer_1.plainToInstance)(Brand, data, { groups: groups || [] }) : [];
141
141
  }
142
142
  authorize(user) {
143
- this.authorisation.manage = false;
143
+ this.authorization.manage = false;
144
144
  if (!user.isBrandUser()) {
145
145
  return;
146
146
  }
147
- this.authorisation.manage = user?.hasPermission(security_1.Permission.BrandAccountManage);
147
+ this.authorization.manage = user?.hasPermission(security_1.Permission.BrandAccountManage);
148
148
  }
149
149
  }
150
150
  exports.Brand = Brand;
@@ -246,7 +246,7 @@ __decorate([
246
246
  __decorate([
247
247
  (0, class_transformer_1.Expose)({ groups: ['admin'] }),
248
248
  __metadata("design:type", Object)
249
- ], Brand.prototype, "authorisation", void 0);
249
+ ], Brand.prototype, "authorization", void 0);
250
250
  __decorate([
251
251
  (0, class_transformer_1.Expose)(),
252
252
  __metadata("design:type", Function),
@@ -12,7 +12,7 @@ export declare class Category {
12
12
  createdOn: Date;
13
13
  updatedBy: User;
14
14
  updatedOn: Date;
15
- authorisation: {
15
+ authorization: {
16
16
  manage: boolean;
17
17
  };
18
18
  constructor(props?: Partial<Category>);
@@ -28,7 +28,7 @@ class Category {
28
28
  createdOn;
29
29
  updatedBy;
30
30
  updatedOn;
31
- authorisation = {
31
+ authorization = {
32
32
  manage: false
33
33
  };
34
34
  constructor(props) {
@@ -67,11 +67,11 @@ class Category {
67
67
  return data ? (0, class_transformer_1.plainToInstance)(Category, data, { groups: groups || [] }) : [];
68
68
  }
69
69
  authorize(user) {
70
- this.authorisation.manage = false;
70
+ this.authorization.manage = false;
71
71
  if (!user?.isBrandUser()) {
72
72
  return;
73
73
  }
74
- this.authorisation.manage = user?.hasPermission(security_1.Permission.CategoryManage);
74
+ this.authorization.manage = user?.hasPermission(security_1.Permission.CategoryManage);
75
75
  }
76
76
  }
77
77
  exports.Category = Category;
@@ -125,7 +125,7 @@ __decorate([
125
125
  __decorate([
126
126
  (0, class_transformer_1.Expose)({ groups: ['admin'] }),
127
127
  __metadata("design:type", Object)
128
- ], Category.prototype, "authorisation", void 0);
128
+ ], Category.prototype, "authorization", void 0);
129
129
  __decorate([
130
130
  (0, class_transformer_1.Expose)({ groups: ['admin'] }),
131
131
  __metadata("design:type", Function),
@@ -11,7 +11,7 @@ export declare class Collection {
11
11
  createdOn: Date;
12
12
  updatedBy: User;
13
13
  updatedOn: Date;
14
- authorisation: {
14
+ authorization: {
15
15
  manage: boolean;
16
16
  };
17
17
  publisher: Publisher;
@@ -27,7 +27,7 @@ class Collection {
27
27
  createdOn;
28
28
  updatedBy;
29
29
  updatedOn;
30
- authorisation = {
30
+ authorization = {
31
31
  manage: false
32
32
  };
33
33
  publisher;
@@ -59,11 +59,11 @@ class Collection {
59
59
  return data ? (0, class_transformer_1.plainToInstance)(Collection, data, { groups: groups || [] }) : [];
60
60
  }
61
61
  authorize(user, publisher) {
62
- this.authorisation.manage = false;
62
+ this.authorization.manage = false;
63
63
  if (!user.isPublisherUser() || publisher.status !== security_1.AccountStatus.Active) {
64
64
  return;
65
65
  }
66
- this.authorisation.manage = user?.hasPermission(security_1.Permission.CollectionManage);
66
+ this.authorization.manage = user?.hasPermission(security_1.Permission.CollectionManage);
67
67
  }
68
68
  }
69
69
  exports.Collection = Collection;
@@ -109,7 +109,7 @@ __decorate([
109
109
  __decorate([
110
110
  (0, class_transformer_1.Expose)({ groups: ['admin'] }),
111
111
  __metadata("design:type", Object)
112
- ], Collection.prototype, "authorisation", void 0);
112
+ ], Collection.prototype, "authorization", void 0);
113
113
  __decorate([
114
114
  (0, class_transformer_1.Expose)(),
115
115
  (0, class_transformer_1.Type)(() => publisher_model_1.Publisher),
@@ -11,7 +11,7 @@ export declare class FeedbackItem {
11
11
  createdOn: Date;
12
12
  updatedBy: User;
13
13
  updatedOn: Date;
14
- authorisation: {
14
+ authorization: {
15
15
  manage: boolean;
16
16
  publish: boolean;
17
17
  archive: boolean;
@@ -25,7 +25,7 @@ class FeedbackItem {
25
25
  createdOn;
26
26
  updatedBy;
27
27
  updatedOn;
28
- authorisation = {
28
+ authorization = {
29
29
  manage: false,
30
30
  publish: false,
31
31
  archive: false,
@@ -41,17 +41,17 @@ class FeedbackItem {
41
41
  return data ? (0, class_transformer_1.plainToInstance)(FeedbackItem, data, { groups: groups || [] }) : [];
42
42
  }
43
43
  authorize(user) {
44
- this.authorisation.manage = false;
45
- this.authorisation.publish = false;
46
- this.authorisation.archive = false;
44
+ this.authorization.manage = false;
45
+ this.authorization.publish = false;
46
+ this.authorization.archive = false;
47
47
  if (!user?.isBrandUser()) {
48
48
  return;
49
49
  }
50
50
  const canManage = user?.hasPermission(security_1.Permission.FeedbackManage);
51
51
  const canPublish = user?.hasPermission(security_1.Permission.FeedbackPublish);
52
- this.authorisation.manage = canManage && !this.published;
53
- this.authorisation.publish = canPublish && !this.published;
54
- this.authorisation.archive = canPublish && this.published;
52
+ this.authorization.manage = canManage && !this.published;
53
+ this.authorization.publish = canPublish && !this.published;
54
+ this.authorization.archive = canPublish && this.published;
55
55
  }
56
56
  validate() {
57
57
  const content = this?.question?.trim();
@@ -122,7 +122,7 @@ __decorate([
122
122
  __decorate([
123
123
  (0, class_transformer_1.Expose)({ groups: ['admin'] }),
124
124
  __metadata("design:type", Object)
125
- ], FeedbackItem.prototype, "authorisation", void 0);
125
+ ], FeedbackItem.prototype, "authorization", void 0);
126
126
  __decorate([
127
127
  (0, class_transformer_1.Expose)(),
128
128
  (0, class_transformer_1.Type)(() => feedback_option_model_1.FeedbackOption),
@@ -14,7 +14,7 @@ export declare class Feedback {
14
14
  createdOn: Date;
15
15
  updatedBy: User;
16
16
  updatedOn: Date;
17
- authorisation: {
17
+ authorization: {
18
18
  manage: boolean;
19
19
  publish: boolean;
20
20
  };
@@ -31,7 +31,7 @@ class Feedback {
31
31
  createdOn;
32
32
  updatedBy;
33
33
  updatedOn;
34
- authorisation = {
34
+ authorization = {
35
35
  manage: false,
36
36
  publish: false,
37
37
  };
@@ -66,13 +66,13 @@ class Feedback {
66
66
  return data ? (0, class_transformer_1.plainToInstance)(Feedback, data, { groups: groups || [] }) : [];
67
67
  }
68
68
  authorize(user) {
69
- this.authorisation.manage = false;
70
- this.authorisation.publish = false;
69
+ this.authorization.manage = false;
70
+ this.authorization.publish = false;
71
71
  if (!user?.isBrandUser()) {
72
72
  return;
73
73
  }
74
- this.authorisation.manage = user?.hasPermission(security_1.Permission.FeedbackManage);
75
- this.authorisation.publish = user?.hasPermission(security_1.Permission.FeedbackPublish);
74
+ this.authorization.manage = user?.hasPermission(security_1.Permission.FeedbackManage);
75
+ this.authorization.publish = user?.hasPermission(security_1.Permission.FeedbackPublish);
76
76
  if (this.items?.length) {
77
77
  for (const item of this.items) {
78
78
  item.authorize(user);
@@ -131,7 +131,7 @@ __decorate([
131
131
  __decorate([
132
132
  (0, class_transformer_1.Expose)({ groups: ['admin'] }),
133
133
  __metadata("design:type", Object)
134
- ], Feedback.prototype, "authorisation", void 0);
134
+ ], Feedback.prototype, "authorization", void 0);
135
135
  __decorate([
136
136
  (0, class_transformer_1.Expose)(),
137
137
  (0, class_transformer_1.Type)(() => feedback_item_model_1.FeedbackItem),
@@ -68,7 +68,7 @@ export declare class Post {
68
68
  feedback: Feedback;
69
69
  collection: Post[];
70
70
  gallery: GalleryItem[];
71
- authorisation: IPostAuthorization;
71
+ authorization: IPostAuthorization;
72
72
  validators: Item<boolean>[];
73
73
  constructor(props?: Partial<Post>);
74
74
  get type(): PostType;
@@ -61,7 +61,7 @@ class Post {
61
61
  feedback;
62
62
  collection;
63
63
  gallery;
64
- authorisation = {
64
+ authorization = {
65
65
  view: false,
66
66
  create: false,
67
67
  edit: false,
@@ -169,9 +169,9 @@ class Post {
169
169
  }
170
170
  }
171
171
  validateForPublic() {
172
- this.authorisation.canLike = true;
173
- this.authorisation.canShare = true;
174
- this.authorisation.canBookmark = [
172
+ this.authorization.canLike = true;
173
+ this.authorization.canShare = true;
174
+ this.authorization.canBookmark = [
175
175
  post_type_1.PostType.Article,
176
176
  post_type_1.PostType.Book,
177
177
  post_type_1.PostType.Audio,
@@ -179,28 +179,28 @@ class Post {
179
179
  post_type_1.PostType.News,
180
180
  post_type_1.PostType.Event,
181
181
  ].includes(this.type) ? true : false;
182
- this.authorisation.canDownload = [
182
+ this.authorization.canDownload = [
183
183
  post_type_1.PostType.Article,
184
184
  post_type_1.PostType.Book,
185
185
  ].includes(this.type) ? true : false;
186
- this.authorisation.showGallery = [
186
+ this.authorization.showGallery = [
187
187
  post_type_1.PostType.Event,
188
188
  post_type_1.PostType.News,
189
189
  ].includes(this.type) ? true : false;
190
190
  }
191
191
  authorize(user, publisher) {
192
- this.authorisation.view = false;
193
- this.authorisation.create = false;
194
- this.authorisation.edit = false;
195
- this.authorisation.delete = false;
196
- this.authorisation.draft = false;
197
- this.authorisation.approve = false;
198
- this.authorisation.publish = false;
199
- this.authorisation.unpublish = false;
200
- this.authorisation.archive = false;
201
- this.authorisation.unarchive = false;
202
- this.authorisation.block = false;
203
- this.authorisation.unblock = false;
192
+ this.authorization.view = false;
193
+ this.authorization.create = false;
194
+ this.authorization.edit = false;
195
+ this.authorization.delete = false;
196
+ this.authorization.draft = false;
197
+ this.authorization.approve = false;
198
+ this.authorization.publish = false;
199
+ this.authorization.unpublish = false;
200
+ this.authorization.archive = false;
201
+ this.authorization.unarchive = false;
202
+ this.authorization.block = false;
203
+ this.authorization.unblock = false;
204
204
  const isDraft = this.status === status_type_1.StatusType.Draft;
205
205
  const isApproved = this.status === status_type_1.StatusType.Ready;
206
206
  const isPublished = this.status === status_type_1.StatusType.Published;
@@ -235,14 +235,14 @@ class Post {
235
235
  break;
236
236
  }
237
237
  if (isBlocked) {
238
- this.authorisation.block = false;
239
- this.authorisation.unblock = canBlock;
238
+ this.authorization.block = false;
239
+ this.authorization.unblock = canBlock;
240
240
  }
241
241
  else {
242
- this.authorisation.block = canBlock;
243
- this.authorisation.unblock = false;
242
+ this.authorization.block = canBlock;
243
+ this.authorization.unblock = false;
244
244
  }
245
- this.authorisation.view = canView;
245
+ this.authorization.view = canView;
246
246
  return;
247
247
  }
248
248
  if (user.hasPublisherAuthorization(publisher.id)) {
@@ -284,28 +284,28 @@ class Post {
284
284
  canArchive = user?.hasPermission(security_1.Permission.PostNewsArchive);
285
285
  break;
286
286
  }
287
- this.authorisation.view = canView;
287
+ this.authorization.view = canView;
288
288
  if (publisher.status !== security_1.AccountStatus.Active) {
289
289
  return;
290
290
  }
291
- this.authorisation.create = canEdit && publisher.hasAuthorizedType(this.postType);
291
+ this.authorization.create = canEdit && publisher.hasAuthorizedType(this.postType);
292
292
  if (isDraft) {
293
- this.authorisation.edit = canEdit;
294
- this.authorisation.delete = canEdit;
295
- this.authorisation.approve = canEdit;
296
- this.authorisation.archive = canArchive;
293
+ this.authorization.edit = canEdit;
294
+ this.authorization.delete = canEdit;
295
+ this.authorization.approve = canEdit;
296
+ this.authorization.archive = canArchive;
297
297
  }
298
298
  if (isApproved) {
299
- this.authorisation.draft = canEdit;
300
- this.authorisation.publish = canPublish;
301
- this.authorisation.archive = canArchive;
299
+ this.authorization.draft = canEdit;
300
+ this.authorization.publish = canPublish;
301
+ this.authorization.archive = canArchive;
302
302
  }
303
303
  if (isPublished) {
304
- this.authorisation.unpublish = canPublish;
305
- this.authorisation.archive = canArchive;
304
+ this.authorization.unpublish = canPublish;
305
+ this.authorization.archive = canArchive;
306
306
  }
307
307
  if (isArchived) {
308
- this.authorisation.unarchive = canArchive;
308
+ this.authorization.unarchive = canArchive;
309
309
  }
310
310
  }
311
311
  }
@@ -313,8 +313,8 @@ class Post {
313
313
  if (!this.validators) {
314
314
  this.setValidators();
315
315
  }
316
- this.authorisation.isValid = true;
317
- this.authorisation.showGallery = [
316
+ this.authorization.isValid = true;
317
+ this.authorization.showGallery = [
318
318
  post_type_1.PostType.Event,
319
319
  post_type_1.PostType.News,
320
320
  ].includes(this.type) ? true : false;
@@ -327,53 +327,53 @@ class Post {
327
327
  if (!this.author) {
328
328
  validator = this.validators?.find(i => i.name === 'author');
329
329
  validator.value = false;
330
- this.authorisation.isValid = false;
330
+ this.authorization.isValid = false;
331
331
  }
332
332
  if (!this.title || !this.title.trim()) {
333
333
  validator = this.validators?.find(i => i.name === 'title');
334
334
  validator.value = false;
335
- this.authorisation.isValid = false;
335
+ this.authorization.isValid = false;
336
336
  }
337
337
  if (!this.description || !this.description.trim()) {
338
338
  validator = this.validators?.find(i => i.name === 'description');
339
339
  validator.value = false;
340
- this.authorisation.isValid = false;
340
+ this.authorization.isValid = false;
341
341
  }
342
342
  if (!this.imageUrl || !this.imageUrl.trim()) {
343
343
  validator = this.validators?.find(i => i.name === 'image');
344
344
  validator.value = false;
345
- this.authorisation.isValid = false;
345
+ this.authorization.isValid = false;
346
346
  }
347
347
  if (!this.feedUrl || !this.feedUrl.trim()) {
348
348
  validator = this.validators?.find(i => i.name === 'feed');
349
349
  validator.value = false;
350
- this.authorisation.isValid = false;
350
+ this.authorization.isValid = false;
351
351
  }
352
352
  if (contentMandatory.includes(this.type) && !this.content?.trim()) {
353
353
  validator = this.validators?.find(i => i.name === 'content');
354
354
  validator.value = false;
355
- this.authorisation.isValid = false;
355
+ this.authorization.isValid = false;
356
356
  }
357
357
  if (this.type === post_type_1.PostType.Book && !this.pdfUrl?.trim()) {
358
358
  validator = this.validators?.find(i => i.name === 'pdf');
359
359
  validator.value = false;
360
- this.authorisation.isValid = false;
360
+ this.authorization.isValid = false;
361
361
  }
362
362
  if (this.type === post_type_1.PostType.Audio && !this.mediaUrl?.trim()) {
363
363
  validator = this.validators?.find(i => i.name === 'audio');
364
364
  validator.value = false;
365
- this.authorisation.isValid = false;
365
+ this.authorization.isValid = false;
366
366
  }
367
367
  if (this.type === post_type_1.PostType.Video && !this.mediaUrl?.trim()) {
368
368
  validator = this.validators?.find(i => i.name === 'video');
369
369
  validator.value = false;
370
- this.authorisation.isValid = false;
370
+ this.authorization.isValid = false;
371
371
  }
372
372
  if (this.type === post_type_1.PostType.Event
373
373
  && (!this?.info?.events || this?.info?.events?.length === 0)) {
374
374
  validator = this.validators?.find(i => i.name === 'schedule');
375
375
  validator.value = false;
376
- this.authorisation.isValid = false;
376
+ this.authorization.isValid = false;
377
377
  }
378
378
  }
379
379
  get statusContext() {
@@ -631,7 +631,7 @@ __decorate([
631
631
  __decorate([
632
632
  (0, class_transformer_1.Expose)({ groups: ['admin'] }),
633
633
  __metadata("design:type", Object)
634
- ], Post.prototype, "authorisation", void 0);
634
+ ], Post.prototype, "authorization", void 0);
635
635
  __decorate([
636
636
  (0, class_transformer_1.Expose)({ groups: ['admin'] }),
637
637
  (0, class_transformer_1.Type)(() => item_model_1.Item),
@@ -23,7 +23,7 @@ export declare class Promotion {
23
23
  statusChangedOn: Date;
24
24
  publishedBy: User;
25
25
  publishedOn: Date;
26
- authorisation: {
26
+ authorization: {
27
27
  edit: boolean;
28
28
  publish: boolean;
29
29
  unpublish: boolean;