Tryton - Issues

 

Issue7501

Title Recursively remove dependant fields when no access
Priority bug Status resolved
Superseder Nosy List ced, pokoli, reviewbot, roundup-bot
Type crash Components trytond
Assigned To pokoli Keywords review
Reviews 46551002
View: 46551002

Created on 2018-06-05.15:33:52 by pokoli, last changed by roundup-bot.

Messages
New changeset f14b83cd1f0e by Sergi Almacellas Abellana in branch '4.8':
Recursively remove dependant fields when no access
https://hg.tryton.org/trytond/rev/f14b83cd1f0e

New changeset 25c853f4c9c2 by Sergi Almacellas Abellana in branch '4.6':
Recursively remove dependant fields when no access
https://hg.tryton.org/trytond/rev/25c853f4c9c2

New changeset d4c0f73469a0 by Sergi Almacellas Abellana in branch '4.4':
Recursively remove dependant fields when no access
https://hg.tryton.org/trytond/rev/d4c0f73469a0

New changeset b4051e6add07 by Sergi Almacellas Abellana in branch '4.2':
Recursively remove dependant fields when no access
https://hg.tryton.org/trytond/rev/b4051e6add07

New changeset 719132d75e9d by Sergi Almacellas Abellana in branch '4.0':
Recursively remove dependant fields when no access
https://hg.tryton.org/trytond/rev/719132d75e9d
New changeset 6bcf942a72df by Sergi Almacellas Abellana in branch 'default':
Recursively remove dependant fields when no access
https://hg.tryton.org/trytond/rev/6bcf942a72df

New changeset c9a09915cc34 by Sergi Almacellas Abellana in branch 'default':
Add test for recursive dependant fields without access
https://hg.tryton.org/trytond/rev/c9a09915cc34
review46551002 updated at https://codereview.tryton.org/46551002/#ps90001
review46551002 updated at https://codereview.tryton.org/46551002/#ps70001
review46551002 updated at https://codereview.tryton.org/46551002/#ps50005
review46551002 updated at https://codereview.tryton.org/46551002/#ps40001
review46551002 updated at https://codereview.tryton.org/46551002/#ps20001
New review46551002 at https://codereview.tryton.org/46551002/#ps1
msg41247 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-06-05.16:37:11
Then we should raise it as a bug. 

Here is review46551002 that prevents the infinite loop.
msg41246 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-06-05.15:37:16
I would prefer to fix the infinite loop because I guess this can also happen if a field depend on a field that depend on the first one.
msg41245 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-06-05.15:33:51
We recently found that if you add a read access restriction to a field that depends on itself it causes an infinite loop on the server causing it to halt. 

This is because a field is removed from the view if the user is not allowed to access one of it's dependant fields [1]. This causes an infinite loop if the field depends on itself. 

I think we can improve test depends to ensure that a field does not depend on itself. 

[1] http://hg.tryton.org/trytond/file/e4061cc9c9b0/trytond/model/modelview.py#l403
History
Date User Action Args
2018-07-26 00:45:07roundup-botsetmessages: + msg42366
2018-07-11 16:26:38roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg42140
2018-07-06 16:51:44reviewbotsetmessages: + msg42083
2018-07-03 14:56:55pokolisettitle: Ensure no field depends on itself -> Recursively remove dependant fields when no access
2018-07-03 14:49:05reviewbotsetmessages: + msg42048
2018-07-03 12:47:41reviewbotsetmessages: + msg42040
2018-07-03 12:19:11reviewbotsetmessages: + msg42037
2018-06-06 12:27:56reviewbotsetmessages: + msg41271
2018-06-05 16:57:36reviewbotsetnosy: + reviewbot
messages: + msg41248
2018-06-05 16:57:35reviewbotsetreviews: 46551002
keyword: + review

Showing 10 items. Show all history (warning: this could be VERY long)