It's an bug in 0.9a8 that is fixed in the trunk. hopefully 0.9a9 will
be out soon. In the meantime use tg-admin shell to add users.
On 7/21/06, Derek <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I've searched everywhere for a solution to this problem and I can't
> seem to find anything thats helped. Whenever I try to add a user via
> CatWalk (on a brand new 'quickstart'ed project) it gives me the
> following. I can still add groups though. The code in __init__.py that
> the traceback references is :
>
> class ProviderWrapper(object):
>
> def __getattr__(self, name):
> try:
> provider= cherrypy.request.identityProvider
> except AttributeError:
> provider= None
>
> if provider is None:
> if not request_available():
> raise RequestRequiredException()
> *** raise IdentityManagementNotEnabledException()
>
> return getattr(provider, name)
>
> That would lead me to believe that I dont have my provider set in my
> app.cfg, however, this states otherwise:
>
> # 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"
>
> 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"
>
> identity.soprovider.model.user="fom.model.User"
> identity.soprovider.model.group="fom.model.Group"
> identity.soprovider.model.permission="fom.model.Permission"
>
> [/static]
> static_filter.on = True
> static_filter.dir = "%(top_level_dir)s/static"
>
> [/favicon.ico]
> static_filter.on = True
> static_filter.file = "%(top_level_dir)s/static/images/favicon.ico"
>
>
> Traceback:
>
> 21/Jul/2006:09:20:42 HTTP INFO Traceback (most recent call last):
> File
> "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py",
> line 105, in _run
> self.main()
> File
> "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py",
> line 254, in main
> body = page_handler(*virtual_path, **self.params)
> File "/home/fom/turbogears/turbogears/identity/conditions.py", line
> 275, in _wrapper
> return fn( *args, **kw )
> File "<string>", line 3, in add
> File "/home/fom/turbogears/turbogears/controllers.py", line 281, in
> expose
> output = database.run_with_transaction(
> File "<string>", line 5, in run_with_transaction
> File "/home/fom/turbogears/turbogears/database.py", line 245, in
> so_rwt
> retval = func(*args, **kw)
> File "<string>", line 5, in _expose
> File "/home/fom/turbogears/turbogears/controllers.py", line 298, in
> <lambda>
> mapping, fragment, *args, **kw)))
> File "/home/fom/turbogears/turbogears/controllers.py", line 322, in
> _execute_func
> output = errorhandling.try_call(func, *args, **kw)
> File "/home/fom/turbogears/turbogears/errorhandling.py", line 68, in
> try_call
> return func(self, *args, **kw)
> File "/home/fom/turbogears/turbogears/toolbox/catwalk/__init__.py",
> line 742, in add
> new_object = obj(**params)
> File
> "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/declarative.py",
> line 94, in _wrapper
> return fn(self, *args, **kwargs)
> File
> "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/main.py",
> line 1214, in __init__
> self._create(id, **kw)
> File
> "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/main.py",
> line 1241, in _create
> self.set(**kw)
> File
> "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/main.py",
> line 1106, in set
> setattr(self, name, value)
> File "/home/fom/fom/fom/model.py", line 90, in _set_password
> hash = identity.encrypt_password(cleartext_password)
> File "/home/fom/turbogears/turbogears/identity/__init__.py", line
> 115, in encrypt_password
> return encrypt_password(cleartext)
> File "/home/fom/turbogears/turbogears/identity/soprovider.py", line
> 402, in encrypt_password
> hash = identity.current_provider.\
> File "/home/fom/turbogears/turbogears/identity/__init__.py", line 79,
> 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].
>
> Anyone have any ideas? This is a version of trunk I checked out
> yesterday.
>
>
> >
>
--
cheers
elvelind grandin
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---