Created on 2018-10-05.00:26:19 by ced, last changed 1 month ago by roundup-bot.
New changeset d5ee4e0cc24b by Cédric Krier in branch 'default': Skip access check on ModelStorage instances https://hg.tryton.org/tryton-env/rev/d5ee4e0cc24b
New changeset 982a131026e7 by Cédric Krier in branch 'default': Skip access check on ModelStorage instances https://hg.tryton.org/trytond/rev/982a131026e7
Indeed it is a more than a performance issue because on ModelView.button the decorated function is called with _check_access
disabled but the records
instances have still the _check_access
context. So if getattr
or save
are called on the records for a field that user has no access, an error is raised even if she has access right to trigger the button.
I think in order to avoid future similar issue than issue7764, we could remove check_access from the context when instantiate a record. The rational is that instance can only be accessed from the code running on the server and as we have the design to check access at the border/entry point, so access from instances does not need to be checked.
History | |||
---|---|---|---|
Date | User | Action | Args |
2020-12-18 00:09:27 | roundup-bot | set | messages: + msg63335 |
2020-12-18 00:09:24 | roundup-bot | set | messages:
+ msg63334 nosy: + roundup-bot status: testing -> resolved |
2020-11-17 12:16:44 | reviewbot | set | messages: + msg61984 |
2020-11-17 11:47:20 | reviewbot | set | messages:
+ msg61983 nosy: + reviewbot |
2020-11-17 11:45:30 | ced | set | keyword:
+ review reviews: 322581002 status: in-progress -> testing |
2020-11-17 11:42:21 | ced | set | messages:
+ msg61982 status: unread -> in-progress type: performance -> behavior |
2018-10-05 00:41:44 | ced | set | assignedto: ced |
2018-10-05 00:26:19 | ced | create |
Showing 10 items. Show all history (warning: this could be VERY long)