Actually I get the same exception
IdentityManagementNotEnabledException when I try to run nosetests on a
freshly quickstarted project.
(Even when I set identity.on=True in config.py)

-- nyenyec

On 2/22/06, Patrick Lewis <[EMAIL PROTECTED]> wrote:
>
> Diwaker Gupta wrote:
> > Some weird things have started happening since this patch:
> >
> > o I have my own User class which derives from TG_User, and some other
> > classes -- none of these show up in Catwalk anymore. It was working
> > just fine this morning.
>
> I'm not sure why this change would impact catwalk at all, but I can
> take a look.  Do the other classes have anything to do with Identity?
>
> >
> > o I have a small script to populate the database for testing purposes.
> > Since updating, I'm getting this error when I run it:
> >
> >   File "/home/dgupta/local/turbogears/turbogears/identity/soprovider.py",
> > line 292, in _set_password
> >     hash = identity.current_provider.encrypt_password(cleartext_password)
> >   File "/home/dgupta/local/turbogears/turbogears/identity/__init__.py",
> > line 74, in __getattr__
> >     raise IdentityManagementNotEnabledException()
> > turbogears.identity.exceptions.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].
> >
> > However, Identity is turned on. Infact, it does populate some other
> > tables that I have -- it just borks when I try to create a User with
> > password=something.
> >
> > Any ideas?
>
> My off-the-cuff guess (I can't access the code right now) is that
> Identity isn't actually up and running when you try to create the user.
> The current logic tries to pull from the algorithm from the identity
> provider, but I guess that's not always guaranteed to be available. I
> could try and pull from the config variables, but even those doesn't
> HAVE to be there.
>
> I'm not quite sure what the right thing to do is. I don't think an
> optional init variable is a very pretty choice, but that may be the
> only option to ensure things work as expected.
>
> I probably avoided this error in the tests with a call to:
>
> turbogears.startup.startTurboGears()
>
> You may want to see if calling that before you set up your model
> resolves things. I don't expect that's a good permanent solution,
> though.
>
>
>
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to