I'm at the docs for Identity Management found here:
http://docs.turbogears.org/1.0/IdentityManagement?action=show&redirect=1.0%2FIdentityManagment

I've decided that the right thing to do is put the whole
administrative console for my application under its own controller as
explained on that page:

"Protecting a Directory

To restrict access to an entire controller (subdirectory), derive your
Controller from identity.SecureResource and add a require attribute at
the class level:

class MySecureController(turbogears.Controller,
identity.SecureResource):
    require = identity.in_group("admin")

    # etc. ..."

My first problem is that turbogears.Controller can't be found.  When I
try instead:

class MySecureController(controllers.Controller,
identity.SecureResource):
    require = identity.in_group("admin")

I can at least run my turbogears app.

But unfortunately when I try to call up any of the pages that I've put
under this alternative controller I get a 404:
404 Not Found

The path '/edit_wiki' was not found.

Page handler: "The path '/edit_wiki' was not found."
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 246, in main
    page_handler, object_path, virtual_path =
self.mapPathToObject(path)
  File "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/
cherrypy/_cphttptools.py", line 312, in mapPathToObject
    raise cherrypy.NotFound(objectpath)
NotFound: 404


Am I correct in thinking there is in fact a typo on the page?

And why can't I access anything under the new controller?  I'd hoped
it would see that I wasn't logged in and redirect me to login
automatically.

I can still access the pages under the original controller.  How do I
make these two controllers co-exist?

Thanks!


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

Reply via email to