[FIX] Return correct userid in tokeninfo

bzr revid: fme@openerp.com-20120924160213-kfjdi6s01mcic9jp
This commit is contained in:
Fabien Meghazi
2012-09-24 18:02:13 +02:00
parent 292252eb7d
commit 1b5939817f
3 changed files with 2 additions and 3 deletions
@@ -37,7 +37,6 @@ class AuthOAuthProvider(openerpweb.Controller):
@openerpweb.httprequest
def auth(self, req, **kw):
# TODO: if logged and approval_prompt == auto then return get_token and redirect
search = req.params.copy()
if req.debug:
search['debug'] = 1
+1 -1
View File
@@ -49,7 +49,7 @@ class res_users(osv.osv):
user = self.browse(cr, uid, user_id[0], context=context)
if access_token == user.last_oauth_token:
return {
"user_id": uid,
"user_id": user.id,
"scope": user.last_oauth_token_scope,
"email": user.partner_id.email or '', # TODO: should deliver only according to scopes
"scope": user.last_oauth_token_scope,
@@ -21,7 +21,7 @@ instance.auth_oauth_provider.ProviderAction = instance.web.Widget.extend({
// that should be displayed in the approval confirmation dialog.
if (!this._error) {
// params.approval_prompt TODO
// params.approval_prompt TODO --> add 'none' (default)
// TODO: get client_id and scope
this.$('.oe_oauth_provider_approval').show().on('click', '.oe_oauth_provider_allow', function() {
instance.session.rpc('/oauth2/get_token', {