On 18/05/12 12:03 +0200, Cédric Krier wrote:
> Hi,
> 
> I'm facing an issue with the access right.
> Here is a summary of the issue:
> 
>     The access rights are enforced in Tryton in the CRWD methods, this
>     means that everywhere those rights are enforced except if the
>     context is switched to root.
>     So the problem is that most of the time, the developper forget about
>     this when writing code by assuming he will have access to
>     everything.
>     For example in account_stock_anglo_saxon:
>         The opening of invoice needs to read the moves via the
>         sale/purchase, but the user could have only access to account
>         stuffs.
> 
> I see two solutions to this issue:
> 
>     - Using the root context switching in the code everywhere it is
>       needed based on the default access right define in Tryton.
>       This means the developper must take care of this everytime he
>       write code. This is a little bit constraining but it has the
>       advantage to execute the smaller part of the code as root.

So I will fix anglo_saxon using this method.
Let continue to use this pattern and we will see if in the future we
will face too much issues.


-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgprcvyraKaBP.pgp
Description: PGP signature

Reply via email to