On May 3, 2007, at 11:38 AM, DarkBlue wrote:

>
> Hello
>
> installed the latest version and it works.
> As mentioned in the changelog this exception was raised:
>
> SecureResource now raises an AttributeError when no require attribute
> is  present in the controller class or in the config file. Closes
> #1336.
> (Note: This might break some "broken" apps, fortunately a detailed
> exception  is raised advising how to fix it).
>
> Here is the line where it was raised in the root controller:
>
> bs =
> SecureDataController 
> (sql_class=fadata,list_widget=fa_status_form,list_template='fa.templat 
> es.ports')
> bs.require = identiy.in_group("suser")
>
>
> above code worked before and my question is
> how should it be written now ?

Either declare "require" as a class attribute when subclassing:

class SecureDataController(SecureResources):
        require = "foo"

or bind it at construction time

def __init__(self, require, ...):
        self.require = require

Alberto

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to