Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
SlayJay CreditAttribution: SlayJay commentedMORE INFO:
When I load the add authorization page I get the following notices:
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.
Comment #2
SlayJay CreditAttribution: SlayJay commentedComment #3
seismicmike CreditAttribution: seismicmike commentedThis is a duplicate of http://drupal.org/node/1987350 which has been fixed in 7.x-3.x-dev.