Problem passing credentials to Roundup xmlrpc endpoint
"Hancock, David (DHANCOCK)" <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <[email protected]> |
I am unable to pass a username and password to the xmlrpc endpoint--it seems to get converted into the anonymous user. The documentation (plus some kind assistance from Ralf Schlatterbeck) led me to try the following:
>>> import xmlrpclib
>>> url = "http://admin:adminpw@localhost/support/xmlrpc"
>>> srv = xmlrpclib.ServerProxy(url, allow_none=True)
>>> srv.lookup('user', 'dhancock')
This yields a short stack trace ending with:
xmlrpclib.Fault: <Fault 1: "<class 'roundup.exceptions.Unauthorised'>:Permission to lookup user denied">
When I put Roundup's logging into verbose mode, this is what I see for that request:
2015-11-25 12:21:27,958 INFO open database 'roundup'
2015-11-25 12:21:27,978 INFO commit
2015-11-25 12:21:27,979 DEBUG SQL 'select id from _user where _username=%s and __retired__=%s' ('anonymous', 0)
2015-11-25 12:21:27,980 DEBUG SQL 'select id from _user where _username=%s and __retired__=%s' ('anonymous', 0)
2015-11-25 12:21:27,980 DEBUG SQL 'select _activity,_actor,_address,_alternate_addresses,_creation,_creator,_organisation,_password,_phone,_realname,_roles,_timezone,_username from _user where id=%s' ('2',)
2015-11-25 12:21:27,981 DEBUG SQL 'select linkid from user_queries where nodeid=%s' ('2',)
2015-11-25 12:21:27,982 DEBUG SQL 'select id from _user where _username=%s and __retired__=%s' ('anonymous', 0)
2015-11-25 12:21:27,983 INFO close
Can anyone see what I'm doing wrong? I don't think it's a good idea to add permissions to the 'anonymous' user, but I do want to use xmlrpc to create issues, look up ids, etc. Roundup is running behind Apache, in case that's relevant (using mod_wsgi).
Thank you, and
Cheers!
--
David Hancock | [email protected]<mailto:[email protected]>
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users