()
| 355 | } |
| 356 | |
| 357 | isPublished () { |
| 358 | let left |
| 359 | for (const permission of Array.from(((left = this.get('permissions', true)) != null ? left : []))) { |
| 360 | if ((permission.target === 'public') && (permission.access === 'read')) { return true } |
| 361 | } |
| 362 | return false |
| 363 | } |
| 364 | |
| 365 | publish () { |
| 366 | if (this.isPublished()) { throw new Error('Can\'t publish what\'s already-published. Can\'t kill what\'s already dead.') } |
no test coverage detected