It depends on which method in the filter that the identity code is implemented. It seems that identity is enabled in the 'before_finalize' method but not before that method is called. I am also finding this to be an issue for a similar problem that I am trying to solve.
On Mar 31, 12:48 pm, airportyh <[EMAIL PROTECTED]> wrote: > Hi, I am trying to implement a filter that needs to know who is logged > in. But as soon as I call identity.current I get the an error message: > > File "C:\Documents and Settings\airport\My Documents\projects\mproto > \mproto\managed_customization.py", line 11, in before_main > user = identity.current.user > File "c:\devtools\python25\lib\site-packages\TurboGears-1.0.4.4- > py2.5.egg\turbogears\identity\__init__.py", line 69, in __getattr__ > identity= self.identity() > File "c:\devtools\python25\lib\site-packages\TurboGears-1.0.4.4- > py2.5.egg\turbogears\identity\__init__.py", line 62, in identity > raise IdentityManagementNotEnabledException() > IdentityManagementNotEnabledException: An attempt was made to use a > facility of the TurboGears Identity Management framework, but identity > management hasn't been enabled in the config file [via identity.on]. > > I am guessing it's because the filter is run before the identity runs. > Could any give me advice on what's the best way to deal with this > problem? Thank you. > > Toby --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

