Browse Source

Merge pull request #7 from tracim/fix/751_allow_get_deleted_or_archived

Bastien Sevajol 6 years ago
parent
commit
dd82e04fea
No account linked to committer's email

+ 6 - 0
backend/tracim_backend/views/contents_api/comment_controller.py View File

41
         # login = hapic_data.body
41
         # login = hapic_data.body
42
         app_config = request.registry.settings['CFG']
42
         app_config = request.registry.settings['CFG']
43
         api = ContentApi(
43
         api = ContentApi(
44
+            show_archived=True,
45
+            show_deleted=True,
44
             current_user=request.current_user,
46
             current_user=request.current_user,
45
             session=request.dbsession,
47
             session=request.dbsession,
46
             config=app_config,
48
             config=app_config,
68
         # login = hapic_data.body
70
         # login = hapic_data.body
69
         app_config = request.registry.settings['CFG']
71
         app_config = request.registry.settings['CFG']
70
         api = ContentApi(
72
         api = ContentApi(
73
+            show_archived=True,
74
+            show_deleted=True,
71
             current_user=request.current_user,
75
             current_user=request.current_user,
72
             session=request.dbsession,
76
             session=request.dbsession,
73
             config=app_config,
77
             config=app_config,
97
         """
101
         """
98
         app_config = request.registry.settings['CFG']
102
         app_config = request.registry.settings['CFG']
99
         api = ContentApi(
103
         api = ContentApi(
104
+            show_archived=True,
105
+            show_deleted=True,
100
             current_user=request.current_user,
106
             current_user=request.current_user,
101
             session=request.dbsession,
107
             session=request.dbsession,
102
             config=app_config,
108
             config=app_config,

+ 28 - 0
backend/tracim_backend/views/contents_api/file_controller.py View File

61
         """
61
         """
62
         app_config = request.registry.settings['CFG']
62
         app_config = request.registry.settings['CFG']
63
         api = ContentApi(
63
         api = ContentApi(
64
+            show_archived=True,
65
+            show_deleted=True,
64
             current_user=request.current_user,
66
             current_user=request.current_user,
65
             session=request.dbsession,
67
             session=request.dbsession,
66
             config=app_config,
68
             config=app_config,
95
         """
97
         """
96
         app_config = request.registry.settings['CFG']
98
         app_config = request.registry.settings['CFG']
97
         api = ContentApi(
99
         api = ContentApi(
100
+            show_archived=True,
101
+            show_deleted=True,
98
             current_user=request.current_user,
102
             current_user=request.current_user,
99
             session=request.dbsession,
103
             session=request.dbsession,
100
             config=app_config,
104
             config=app_config,
120
         """
124
         """
121
         app_config = request.registry.settings['CFG']
125
         app_config = request.registry.settings['CFG']
122
         api = ContentApi(
126
         api = ContentApi(
127
+            show_archived=True,
128
+            show_deleted=True,
123
             current_user=request.current_user,
129
             current_user=request.current_user,
124
             session=request.dbsession,
130
             session=request.dbsession,
125
             config=app_config,
131
             config=app_config,
154
         """
160
         """
155
         app_config = request.registry.settings['CFG']
161
         app_config = request.registry.settings['CFG']
156
         api = ContentApi(
162
         api = ContentApi(
163
+            show_archived=True,
164
+            show_deleted=True,
157
             current_user=request.current_user,
165
             current_user=request.current_user,
158
             session=request.dbsession,
166
             session=request.dbsession,
159
             config=app_config,
167
             config=app_config,
181
         """
189
         """
182
         app_config = request.registry.settings['CFG']
190
         app_config = request.registry.settings['CFG']
183
         api = ContentApi(
191
         api = ContentApi(
192
+            show_archived=True,
193
+            show_deleted=True,
184
             current_user=request.current_user,
194
             current_user=request.current_user,
185
             session=request.dbsession,
195
             session=request.dbsession,
186
             config=app_config,
196
             config=app_config,
205
         """
215
         """
206
         app_config = request.registry.settings['CFG']
216
         app_config = request.registry.settings['CFG']
207
         api = ContentApi(
217
         api = ContentApi(
218
+            show_archived=True,
219
+            show_deleted=True,
208
             current_user=request.current_user,
220
             current_user=request.current_user,
209
             session=request.dbsession,
221
             session=request.dbsession,
210
             config=app_config,
222
             config=app_config,
238
         """
250
         """
239
         app_config = request.registry.settings['CFG']
251
         app_config = request.registry.settings['CFG']
240
         api = ContentApi(
252
         api = ContentApi(
253
+            show_archived=True,
254
+            show_deleted=True,
241
             current_user=request.current_user,
255
             current_user=request.current_user,
242
             session=request.dbsession,
256
             session=request.dbsession,
243
             config=app_config,
257
             config=app_config,
270
         """
284
         """
271
         app_config = request.registry.settings['CFG']
285
         app_config = request.registry.settings['CFG']
272
         api = ContentApi(
286
         api = ContentApi(
287
+            show_archived=True,
288
+            show_deleted=True,
273
             current_user=request.current_user,
289
             current_user=request.current_user,
274
             session=request.dbsession,
290
             session=request.dbsession,
275
             config=app_config,
291
             config=app_config,
301
         """
317
         """
302
         app_config = request.registry.settings['CFG']
318
         app_config = request.registry.settings['CFG']
303
         api = ContentApi(
319
         api = ContentApi(
320
+            show_archived=True,
321
+            show_deleted=True,
304
             current_user=request.current_user,
322
             current_user=request.current_user,
305
             session=request.dbsession,
323
             session=request.dbsession,
306
             config=app_config,
324
             config=app_config,
334
         """
352
         """
335
         app_config = request.registry.settings['CFG']
353
         app_config = request.registry.settings['CFG']
336
         api = ContentApi(
354
         api = ContentApi(
355
+            show_archived=True,
356
+            show_deleted=True,
337
             current_user=request.current_user,
357
             current_user=request.current_user,
338
             session=request.dbsession,
358
             session=request.dbsession,
339
             config=app_config,
359
             config=app_config,
352
         """
372
         """
353
         app_config = request.registry.settings['CFG']
373
         app_config = request.registry.settings['CFG']
354
         api = ContentApi(
374
         api = ContentApi(
375
+            show_archived=True,
376
+            show_deleted=True,
355
             current_user=request.current_user,
377
             current_user=request.current_user,
356
             session=request.dbsession,
378
             session=request.dbsession,
357
             config=app_config,
379
             config=app_config,
375
         """
397
         """
376
         app_config = request.registry.settings['CFG']
398
         app_config = request.registry.settings['CFG']
377
         api = ContentApi(
399
         api = ContentApi(
400
+            show_archived=True,
401
+            show_deleted=True,
378
             current_user=request.current_user,
402
             current_user=request.current_user,
379
             session=request.dbsession,
403
             session=request.dbsession,
380
             config=app_config,
404
             config=app_config,
413
         """
437
         """
414
         app_config = request.registry.settings['CFG']
438
         app_config = request.registry.settings['CFG']
415
         api = ContentApi(
439
         api = ContentApi(
440
+            show_archived=True,
441
+            show_deleted=True,
416
             current_user=request.current_user,
442
             current_user=request.current_user,
417
             session=request.dbsession,
443
             session=request.dbsession,
418
             config=app_config,
444
             config=app_config,
440
         """
466
         """
441
         app_config = request.registry.settings['CFG']
467
         app_config = request.registry.settings['CFG']
442
         api = ContentApi(
468
         api = ContentApi(
469
+            show_archived=True,
470
+            show_deleted=True,
443
             current_user=request.current_user,
471
             current_user=request.current_user,
444
             session=request.dbsession,
472
             session=request.dbsession,
445
             config=app_config,
473
             config=app_config,

+ 8 - 0
backend/tracim_backend/views/contents_api/html_document_controller.py View File

46
         """
46
         """
47
         app_config = request.registry.settings['CFG']
47
         app_config = request.registry.settings['CFG']
48
         api = ContentApi(
48
         api = ContentApi(
49
+            show_archived=True,
50
+            show_deleted=True,
49
             current_user=request.current_user,
51
             current_user=request.current_user,
50
             session=request.dbsession,
52
             session=request.dbsession,
51
             config=app_config,
53
             config=app_config,
69
         """
71
         """
70
         app_config = request.registry.settings['CFG']
72
         app_config = request.registry.settings['CFG']
71
         api = ContentApi(
73
         api = ContentApi(
74
+            show_archived=True,
75
+            show_deleted=True,
72
             current_user=request.current_user,
76
             current_user=request.current_user,
73
             session=request.dbsession,
77
             session=request.dbsession,
74
             config=app_config,
78
             config=app_config,
107
         """
111
         """
108
         app_config = request.registry.settings['CFG']
112
         app_config = request.registry.settings['CFG']
109
         api = ContentApi(
113
         api = ContentApi(
114
+            show_archived=True,
115
+            show_deleted=True,
110
             current_user=request.current_user,
116
             current_user=request.current_user,
111
             session=request.dbsession,
117
             session=request.dbsession,
112
             config=app_config,
118
             config=app_config,
138
         """
144
         """
139
         app_config = request.registry.settings['CFG']
145
         app_config = request.registry.settings['CFG']
140
         api = ContentApi(
146
         api = ContentApi(
147
+            show_archived=True,
148
+            show_deleted=True,
141
             current_user=request.current_user,
149
             current_user=request.current_user,
142
             session=request.dbsession,
150
             session=request.dbsession,
143
             config=app_config,
151
             config=app_config,

+ 8 - 0
backend/tracim_backend/views/contents_api/threads_controller.py View File

45
         """
45
         """
46
         app_config = request.registry.settings['CFG']
46
         app_config = request.registry.settings['CFG']
47
         api = ContentApi(
47
         api = ContentApi(
48
+            show_archived=True,
49
+            show_deleted=True,
48
             current_user=request.current_user,
50
             current_user=request.current_user,
49
             session=request.dbsession,
51
             session=request.dbsession,
50
             config=app_config,
52
             config=app_config,
68
         """
70
         """
69
         app_config = request.registry.settings['CFG']
71
         app_config = request.registry.settings['CFG']
70
         api = ContentApi(
72
         api = ContentApi(
73
+            show_archived=True,
74
+            show_deleted=True,
71
             current_user=request.current_user,
75
             current_user=request.current_user,
72
             session=request.dbsession,
76
             session=request.dbsession,
73
             config=app_config,
77
             config=app_config,
106
         """
110
         """
107
         app_config = request.registry.settings['CFG']
111
         app_config = request.registry.settings['CFG']
108
         api = ContentApi(
112
         api = ContentApi(
113
+            show_archived=True,
114
+            show_deleted=True,
109
             current_user=request.current_user,
115
             current_user=request.current_user,
110
             session=request.dbsession,
116
             session=request.dbsession,
111
             config=app_config,
117
             config=app_config,
132
         """
138
         """
133
         app_config = request.registry.settings['CFG']
139
         app_config = request.registry.settings['CFG']
134
         api = ContentApi(
140
         api = ContentApi(
141
+            show_archived=True,
142
+            show_deleted=True,
135
             current_user=request.current_user,
143
             current_user=request.current_user,
136
             session=request.dbsession,
144
             session=request.dbsession,
137
             config=app_config,
145
             config=app_config,

+ 6 - 0
backend/tracim_backend/views/core_api/user_controller.py View File

372
         """
372
         """
373
         app_config = request.registry.settings['CFG']
373
         app_config = request.registry.settings['CFG']
374
         api = ContentApi(
374
         api = ContentApi(
375
+            show_archived=True,
376
+            show_deleted=True,
375
             current_user=request.candidate_user,
377
             current_user=request.candidate_user,
376
             session=request.dbsession,
378
             session=request.dbsession,
377
             config=app_config,
379
             config=app_config,
389
         """
391
         """
390
         app_config = request.registry.settings['CFG']
392
         app_config = request.registry.settings['CFG']
391
         api = ContentApi(
393
         api = ContentApi(
394
+            show_archived=True,
395
+            show_deleted=True,
392
             current_user=request.candidate_user,
396
             current_user=request.candidate_user,
393
             session=request.dbsession,
397
             session=request.dbsession,
394
             config=app_config,
398
             config=app_config,
406
         """
410
         """
407
         app_config = request.registry.settings['CFG']
411
         app_config = request.registry.settings['CFG']
408
         api = ContentApi(
412
         api = ContentApi(
413
+            show_archived=True,
414
+            show_deleted=True,
409
             current_user=request.candidate_user,
415
             current_user=request.candidate_user,
410
             session=request.dbsession,
416
             session=request.dbsession,
411
             config=app_config,
417
             config=app_config,

+ 8 - 0
backend/tracim_backend/views/core_api/workspace_controller.py View File

327
         move_data = hapic_data.body
327
         move_data = hapic_data.body
328
 
328
 
329
         api = ContentApi(
329
         api = ContentApi(
330
+            show_archived=True,
331
+            show_deleted=True,
330
             current_user=request.current_user,
332
             current_user=request.current_user,
331
             session=request.dbsession,
333
             session=request.dbsession,
332
             config=app_config,
334
             config=app_config,
374
         app_config = request.registry.settings['CFG']
376
         app_config = request.registry.settings['CFG']
375
         path_data = hapic_data.path
377
         path_data = hapic_data.path
376
         api = ContentApi(
378
         api = ContentApi(
379
+            show_archived=True,
380
+            show_deleted=True,
377
             current_user=request.current_user,
381
             current_user=request.current_user,
378
             session=request.dbsession,
382
             session=request.dbsession,
379
             config=app_config,
383
             config=app_config,
410
             session=request.dbsession,
414
             session=request.dbsession,
411
             config=app_config,
415
             config=app_config,
412
             show_deleted=True,
416
             show_deleted=True,
417
+            show_archived=True,
413
         )
418
         )
414
         content = api.get_one(
419
         content = api.get_one(
415
             path_data.content_id,
420
             path_data.content_id,
439
         app_config = request.registry.settings['CFG']
444
         app_config = request.registry.settings['CFG']
440
         path_data = hapic_data.path
445
         path_data = hapic_data.path
441
         api = ContentApi(
446
         api = ContentApi(
447
+            show_archived=True,
448
+            show_deleted=True,
442
             current_user=request.current_user,
449
             current_user=request.current_user,
443
             session=request.dbsession,
450
             session=request.dbsession,
444
             config=app_config,
451
             config=app_config,
472
             session=request.dbsession,
479
             session=request.dbsession,
473
             config=app_config,
480
             config=app_config,
474
             show_archived=True,
481
             show_archived=True,
482
+            show_deleted=True,
475
         )
483
         )
476
         content = api.get_one(
484
         content = api.get_one(
477
             path_data.content_id,
485
             path_data.content_id,