[Erp5-dev] minor changes to make security and project work

Bartek Gorny bartek at redpoint.mn.pl
Tue Jul 25 17:02:25 CEST 2006


On 24/07/06, Yoshinori Okuji <yo at nexedi.com> wrote:
> On Monday 24 July 2006 19:45, Bartek Gorny wrote:
> > To make security system work, I made two changes:
> >
> > (1) assign destination_project base category to category_type "assignment"
> >
> > (2) Products.ERP5Type.ERP5Type.py, line 365
> >    - group_id = group_id_generator(**category_dict)
> >    + group_id = group_id_generator(self,**category_dict)
> >
> > The latter was needed to make asSecurityGroupId run as external method.
>
> As I haven't tested asSecurityGroupId as an external method, I might be
> seriosly wrong, but...
>
> According to the code, group_id_generator is obtained from "object", so the
> method should be bound to "object". Thus I _guess_ "self" in an external
> method becomes "object" automatically. What is wrong with this behavior?

I'm not sure what behaviour you mean - inside my external method, a
variable named "object" points to a <type 'object'>, and "self" does
not exist unless explicitly passed as an argument. This much I know
for sure, because I checked it. Therefore to gain access to ERP5
objects I have to pass "self", unless there is some other way to do it
of which I do not know.

B.

> YO
> --
> Yoshinori Okuji, Nexedi CTO
> Nexedi: Consulting and Development of Free / Open Source Software
> http://www.nexedi.com
> ERP5: Full Featured High End Open Source ERP
> http://www.erp5.com
> ERP5 Wiki: Developer Zone for ERP5 Community
> http://wiki.erp5.org
> _______________________________________________
> Erp5-dev mailing list
> Erp5-dev at erp5.org
> http://erp5.org/mailman/listinfo/erp5-dev
>


-- 
"Software is largely a service industry operating under the persistent
but unfounded delusion that it is a manufacturing industry."
Eric S.Raymond, "The Magic Cauldron"



More information about the Erp5-dev mailing list