Commits

Richard Jones committed a0926b6

fix

Comments (0)

Files changed (2)

 
         # generate the token in the db
         sql = '''insert into oauth_access_tokens
-            (token, secret, consumer, account, date_created, last_modified)
+            (token, secret, consumer, user, date_created, last_modified)
             values (%s, %s, %s, %s, %s, %s)'''
         now = datetime.datetime.now()
         safe_execute(cursor, sql, (token, secret, oauth_consumer.key, user,
             now, now))
         return oauth.OAuthToken(token, secret)
 
-    def _get_account(self, token):
+    def _get_user(self, token):
         '''Given an access token, determine the user associated with it.
         '''
         sql = 'select user from oauth_access_tokens where token = %s'
         s = self._oauth_server()
         r = oauth.OAuthRequest(self.env['REQUEST_METHOD'], uri, self.form)
         consumer, token, params = s.verify_request(r)
-        account = s._get_account(token)
-        return consumer, token, params, account
+        user = s._get_user(token)
+        return consumer, token, params, user
 
     def oauth_test_access(self):
         '''A resource that is protected so access without an access token is
         disallowed.
         '''
-        consumer, token, params, account = self._parse_request()
-        return 'Access allowed for %s (ps. I got file=%s, size=%s)'%(account,
+        consumer, token, params, user = self._parse_request()
+        return 'Access allowed for %s (ps. I got file=%s, size=%s)'%(user,
             params['file'], params['size'])