[Product-Developers] external method problem

Jan Pokorný jan.pokorny at ruk.cuni.cz
Thu Oct 1 20:33:06 UTC 2009


Hello,

I have created an external method which returns an class object:

def validateUser(username,password):
    res = Result()
    ... some code producing reply ...
    if reply != None:
        res.success = True
    return res

The method works well.

But when I try use res.success (in another script or in TAL in a page  
template), Plone returns an error saying Unauthorized: You are not  
allowed to access 'success' in this context .

For example:

if res.success == True:
    return 'OK'
else:
    return 'KO'

Is there any restriction in returning class objects from external  
methods? Have I missed something?

Thank you for any help.

Jan




More information about the Product-Developers mailing list