I just tried turning Identity Management on for another project, using
tg-trunk code.  I went thru all the steps listed in the wiki section on
IdentityManagement.  The 3 tables seemed to be correctly created in my
database.

Then I tried to use CatWalk to add the Group and User.  Group was no
problem.  But I'm not able to add a User.  I'm getting the dreaded
IdentityManagementNotEnabledException.  From the traceback, and my
perusal of the code, it appears to be related to the password field,
and an attempt to retrieve the current identity provider.  Relevant
part of the traceback follows:

  File
"/usr/lib/python2.4/site-packages/TurboGears-0.9a1dev_r896-py2.4.egg/turbogears/identity/soprovider.py",
line 292, in _set_password
    hash =
identity.current_provider.encrypt_password(cleartext_password)
  File
"/usr/lib/python2.4/site-packages/TurboGears-0.9a1dev_r896-py2.4.egg/turbogears/identity/__init__.py",
line 74, 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 have repeatedly checked the app.cfg file, and can't find any problem
with it.  Here are the visit and identity parts of it:


# Enable Visit tracking
visit.on=True

# Number of minutes a visit may be idle before it expires.
visit.timeout=20

# The name of the cookie to transmit to the visitor's browser.
visit.cookie.name="tg-visit"

# Domain name to specify when setting the cookie (must begin with .
according to
# RFC 2109). The default (None) should work for most cases and will
default to
# the machine to which the request was made. NOTE: localhost is NEVER a
valid
# value and will NOT WORK.
visit.cookie.domain=".sylviecat.com"

# Specific path for the cookie
visit.cookie.path="/"

# The name of the VisitManager plugin to use for visitor tracking.
visit.manager="sqlobject"


# 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="/identifyFailure"

# 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"


# SqlObjectIdentityProvider
# Configuration options for the default IdentityProvider
# -------------------------

# The classes you wish to use for your Identity model. Leave these
commented out
# to use the default classes for SqlObjectIdentityProvider. Or set them
to the
# classes in your model. NOTE: These aren't TG_* because the TG prefix
is
# reserved for classes created by TurboGears.
identity.soprovider.model.user="blog.model.User"
identity.soprovider.model.group="blog.model.Group"
identity.soprovider.model.permission="blog.model.Permission"

# The password encryption algorithm used when comparing passwords
against what's
# stored in the database. Valid values are 'md5' or 'sha1'. If you do
not
# specify an encryption algorithm, passwords are expected to be clear
text.
#
# The SqlObjectProvider *will* encrypt passwords supplied as part of
your login
# form, but it is *your* responsibility to make certain the database
contains
# passwords encrypted using this algorithm. To make life easier you can
call
#     turbogears.identity.current_provider.encrypt_password( pw )
# to encrypt a password using the algorithm of the current provider.
identity.soprovider.encryption_algorithm=None


Any ideas?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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-trunk
-~----------~----~----~----~------~----~------~--~---

Reply via email to