When I edit a consumer, and attempt to add an authorization, I get an access denied error even though I have the appropriate permissions.

I'm taken to the page: /user/0/applications

and I get two messages:
The XMLRPC Post token wVRkW7MnJSzF9ugN7r7aPDQQeQumc5WQ was updated.

and:
You are not authorized to access this page.

Even though it was the post token was updated, no authorization is created. Any idea what I'm doing wrong?

Comments

SlayJay’s picture

MORE INFO:
When I load the add authorization page I get the following notices:

Notice: Undefined variable: account in oauth_common_authorization_add() (line 76 of D:\zend\Apache2\htdocs\Mountaineer Connection 2\sites\all\modules\oauth\oauth_common.authorizations.inc).
Notice: Trying to get property of non-object in oauth_common_authorization_add() (line 76 of D:\zend\Apache2\htdocs\Mountaineer Connection 2\sites\all\modules\oauth\oauth_common.authorizations.inc).

UPDATE:

Editing the function oauth_common_authorization_add in oauth_common.authorizations.inc fixes the notices.
function oauth_common_authorization_add($consumer) {

$token = new DrupalOAuthToken(user_password(32), user_password(32), $consumer, array(
'uid' => $account->uid,
));
return drupal_get_form('oauth_common_form_authorization', $token);
}

should be changed to:

function oauth_common_authorization_add($consumer) {

$token = new DrupalOAuthToken(user_password(32), user_password(32), $consumer, array(
'uid' => $consumer->uid,
));
return drupal_get_form('oauth_common_form_authorization', $token);
}

HOWEVER.... after adding an authorization to a consumer, nothing happens, and no authorizations are listed for the user.

SlayJay’s picture

Component: User interface » Code
Priority: Normal » Critical
seismicmike’s picture

Status: Active » Closed (fixed)

This is a duplicate of http://drupal.org/node/1987350 which has been fixed in 7.x-3.x-dev.