openidserver fails for non-root users?

2 views
Skip to first unread message

Nathan J. Mehl

unread,
Dec 20, 2009, 11:59:38 PM12/20/09
to byteflow-users
Any time I attempt to sign in via openid on another site with my byteflow blog, I get the following odd exception:

Traceback (most recent call last):

 File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 92, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/project/byteflow/apps/openidserver/views.py", line 82, in endpoint
   raise Exception("Logged in as %s while expecting %s" % (request.user, djangoid.user))

Exception: Logged in as dr_memory while expecting root

And yes, that's quite correct: I'm not posting as the root user, and wouldn't want to.  Poking through openidserver/views.py, I'm not quite sure I understand what's going on: get_djangoid_from_identity() (lines 25-30) seems like it would always return the first superuser in the list (presumably always root).

Is openidserver functional for non-root users?  Is there a bit of additional configuration that I've missed?

-n

--
Everyone knows history moves in circles;
the surprise is how big the circles are.
 (--Greil Marcus)

Richard Esplin

unread,
Dec 21, 2009, 12:45:19 AM12/21/09
to byteflo...@googlegroups.com
Your understanding is correct. I even found the limitation documented somewhere, though I don't see it now. Until someone fixes it, the openid server only works for one user, and that user needs to be the first administrator for the site.

I still think it's pretty slick.

Good luck,

Richard

Alexander Solovyov

unread,
Dec 21, 2009, 6:31:52 AM12/21/09
to byteflo...@googlegroups.com
On 2009-12-21, Nathan J. Mehl wrote:

> Is openidserver functional for non-root users? Is there a bit of additional
> configuration that I've missed?

No, it's intended from start to be usable for a root (blog operator)
only. Maybe we should allow every `is_staff` user to use openid server,
but currently only root is able to use it.

--
Alexander

Reply all
Reply to author
Forward
0 new messages