Sites using PURL and this module (basically anyone doing user testing on an open atrium or any other distro using spaces) would be affected by this.

If you turn on block 1 of masquerade so that you can switch roles on a page, then switch to a different user you'll see the block say "switch back". Clicking this text gives an access denied message. This is triggered because the line printing it to the screen doesn't take it into account.

The following corrects the error for anyone also experiencing this issue on a Spaces based Drupal install. Line 439 of masquerade.module should read

$quick_switch_link[] = l(t('Switch back'), 'masquerade/unswitch', array('query' => array('token' => drupal_get_token('masquerade/unswitch')), 'purl' => array('disabled' => TRUE)));

I haven't tested this w.o. purl present but since it's an optional property it shouldn't cause an issue should PURL not be in use on the site. If it does, checking for the existence of purl before building the properties should fix it. Purl is currently being dev'ed towards D7 so this would probably apply in the 7.x branch as well. As both projects are very popular I figured I'd throw this in here even if just for documentation.

Comments

apaderno’s picture

Version: 6.x-1.6 » 6.x-1.x-dev
Issue summary: View changes
Status: Active » Closed (outdated)

I am closing this bug report, as Drupal 6 is no longer supported. Please re-open it if the issue is still relevant for the Drupal 7 or 8 version of the module.