File tree Expand file tree Collapse file tree 2 files changed +27
-3
lines changed
src/frontend/apps/impress/src/features Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ export interface Access {
77 user : User ;
88 abilities : {
99 destroy : boolean ;
10+ partial_update : boolean ;
1011 retrieve : boolean ;
1112 set_role_to : Role [ ] ;
1213 update : boolean ;
@@ -38,6 +39,7 @@ export interface Doc {
3839 created_at : string ;
3940 updated_at : string ;
4041 abilities : {
42+ attachment_upload : true ;
4143 destroy : boolean ;
4244 link_configuration : boolean ;
4345 manage_accesses : boolean ;
Original file line number Diff line number Diff line change 11import { WorkboxPlugin } from 'workbox-core' ;
22
3- import { Doc , DocsResponse } from '@/features/docs' ;
3+ import {
4+ Doc ,
5+ DocsResponse ,
6+ LinkReach ,
7+ Role ,
8+ } from '@/features/docs/doc-management' ;
49
510import { DBRequest , DocsDB } from './DocsDB' ;
611import { RequestSerializer } from './RequestSerializer' ;
@@ -181,7 +186,8 @@ export class ApiPlugin implements WorkboxPlugin {
181186 . clone ( )
182187 . json ( ) ) as Partial < Doc > ;
183188
184- const newResponse = {
189+ const newResponse : Doc = {
190+ title : '' ,
185191 ...bodyMutate ,
186192 id : uuid ,
187193 content : '' ,
@@ -197,13 +203,29 @@ export class ApiPlugin implements WorkboxPlugin {
197203 update : true ,
198204 partial_update : true ,
199205 retrieve : true ,
206+ attachment_upload : true ,
200207 } ,
201208 accesses : [
202209 {
203210 id : 'dummy-id' ,
211+ role : Role . OWNER ,
212+ team : '' ,
213+ user : {
214+ id : 'dummy-id' ,
215+ email : 'dummy-email' ,
216+ } ,
217+ abilities : {
218+ destroy : false ,
219+ partial_update : false ,
220+ retrieve : true ,
221+ set_role_to : [ ] ,
222+ update : false ,
223+ } ,
204224 } ,
205225 ] ,
206- } as Doc ;
226+ link_reach : LinkReach . RESTRICTED ,
227+ link_role : 'reader' ,
228+ } ;
207229
208230 await DocsDB . cacheResponse (
209231 `${ request . url } ${ uuid } /` ,
You can’t perform that action at this time.
0 commit comments