I keep getting an IdentityManagementNotEnabledException, but it is enabled

66 views
Skip to first unread message

Mike Kent

unread,
Jan 11, 2006, 10:53:25 AM1/11/06
to TurboGears
Morning,

I did an 'svn update' for TG followed by a 'tg-admin update' for my
project this morning, and made sure I was switched over to the new
python-based config files. My project's 'config.py' has Identity
turned on. When I start up the server and attempt to display my
project main page, I get an IdentityManagementNotEnabledException. But
Identity is in fact turned on in config.py. Here's the relevant part
of config.py:

# IDENTITY
# General configuration of the TurboGears Identity management
module
# --------

# Switch to turn on or off the Identity management module
"identity.on" : True,

# [REQUIRED] URL to which CherryPy will internally redirect
# when an access control check fails. If Identity
# management is turned on, a value for this option must
# be specified.
"identity.failure_url" : "/login",

# The IdentityProvider to use -- defaults to the
# SqlObjectIdentityProvider which pulls User, Group, and
# Permission data out of your model database.
"identity.provider" : "sqlobject",

# The names of the fields on the login form containing
# the visitor's user ID and password. In addition, the
# submit button is specified simply so its existence may
# be stripped out prior to passing the form data to the target
# controller.
"identity.form.user_name" : "user_name",
"identity.form.password" : "password",
"identity.form.submit" : "login",

# What sources should the identity provider consider when
# determining the identity associated with a request?
# Comma separated list of identity sources.
# Valid sources: form, visit, http_auth
"identity.source" : "form,http_auth,visit",


Can anyone point out my silly mistake?

Jeff Watkins

unread,
Jan 11, 2006, 10:58:54 AM1/11/06
to turbo...@googlegroups.com
Mike Kent wrote:
> Can anyone point out my silly mistake?

It probably isn't a silly mistake: I've been corresponding with Rune
Hansen all morning about problems like this. But I haven't been able to
track it down.

Which revision are you running? I committed a change in r506 that checks
to see whether Visit tracking is turned on, because Identity relies on it.

But that didn't solve the problem for Rune.

Unfortunately, I don't have the option of working on it during the day
(you know, that whole work thing).

Would you send me your stack trace?

--
Jeff Watkins
http://nerd.newburyportion.com/

Mike Kent

unread,
Jan 11, 2006, 11:04:48 AM1/11/06
to TurboGears
Thanks, Jeff, for the quick response.

I did not have visit tracking turned on in config.py. I turned it on,
restarted the server, and still get the same exception. Here's my full
traceback:

Traceback (most recent call last):
File
"/usr/local/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py",
line 271, in run
main()
File
"/usr/local/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py",
line 502, in main
body = page_handler(*args, **cherrypy.request.paramMap)
File
"/home/mike/Work/pywork/projects/turbogears/turbogears/turbogears/controllers.py",
line 240, in newfunc
html, fragment, *args, **kw)
File
"/home/mike/Work/pywork/projects/turbogears/turbogears/turbogears/database.py",
line 189, in run_with_transaction
retval = func(*args, **kw)
File
"/home/mike/Work/pywork/projects/turbogears/turbogears/turbogears/controllers.py",
line 257, in _execute_func
output = func(self, *args, **kw)
File
"/home/mike/Work/pywork/projects/turbogears/turbogears/turbogears/identity/conditions.py",
line 234, in _wrapper
url= current_provider.url_for_identity_failure()
File
"/home/mike/Work/pywork/projects/turbogears/turbogears/turbogears/identity/__init__.py",
line 88, in __getattr__
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 hope this helps you find the problem. Yeah, I know about that whole
work thing.

Reply all
Reply to author
Forward
0 new messages