Mercurial > p > roundup > code
diff roundup/cgi/client.py @ 5881:9938c40e03bc
Add "rest" and "xmlrpc" values for database tx_Source property
issue2551059: added new values for tx_Source to indicate when /rest
or /xmlrpc endpoint is being used rather than the html web
interface.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 28 Sep 2019 18:28:17 -0400 |
| parents | 94a7669677ae |
| children | b40059d7036f |
line wrap: on
line diff
--- a/roundup/cgi/client.py Sat Sep 28 00:05:40 2019 -0400 +++ b/roundup/cgi/client.py Sat Sep 28 18:28:17 2019 -0400 @@ -503,6 +503,7 @@ # Open the database as the correct user. try: self.determine_user() + self.db.tx_Source = "xmlrpc" except LoginError as msg: output = xmlrpc_.client.dumps( xmlrpc_.client.Fault(401, "%s" % msg), @@ -557,6 +558,7 @@ # TODO: add everything to RestfulDispatcher try: self.determine_user() + self.db.tx_Source = "rest" except LoginError as err: self.response_code = http_.client.UNAUTHORIZED output = s2b("Invalid Login - %s"%str(err))
