Reminiscent to #62278: Doesnt work with OG ! and #71907: og module and masquerade module incompatible from back in 2006, Organic Groups appears to cause a conflict with masquerade again.

When Organic Groups is installed, you are allowed to switch to a user, but when you try to unswitch, you get an access denied error. If you disable Organic Groups, it works as expected.

Unlike the original issue, renaming everything to "zmasquerade" does not effect anything.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hefox’s picture

A solution for this can actually be found in the OG module, or rather to this link in og tracker: http://drupal.org/node/285696

UPDATE system set WEIGHT = 1 where name="og";

Update the weight so OG runs after masquerade.

Not sure what the conflict is exectly, but the access function was being called before the global was being populated.

ptoly’s picture

I continue to get this problem. I'm sorry but I can make head or tail of the fix - UPDATE system set WEIGHT = 1 where name="og";, nor see it in the link to the OG tracker.

Any help would be appreciated.

hefox’s picture

Basically, have OG run after masquare does via changing the weight

Change the weight of the database entry with name OG to "1".

However I think OG groups have been updated so that the issue shouldn't be happening so that may not be whatever causing your issue. :/

ptoly’s picture

Got it. I needed to actually run the SQL query on the Drupal database. First time for a FOB (fresh off the boat) like me :)

For people like me:

1. Open the database in a program like phpmyadmin
2. Choose the SQL tab.
3. Paste in UPDATE system set WEIGHT = 1 where name="og";
4. Click Go.

You're done! I did this and instantly Masquerade works fine.

FYI I am running OG 6.x-2.x-dev (2009-Jun-29) and Masquerade 6.x-1.x-dev (2009-Jun-20)

I hope this helps.

deviantintegral’s picture

Status: Active » Needs review
FileSize
1.53 KB

Since this only appears to be caused when OG is installed, I'm going to suggest that a note about OG be included in a README so it's easy for new installations to set up.

I've attached a patch with a README.txt written in Markdown. If it's better to reduce the weight of Masquerade on installation, then the OG section can be removed along with an updated patch to the install file.

deviantintegral’s picture

Hmm, just read #324934: Conflict with global redirect module. Perhaps we should be setting the weight of Masquerade then?

deviantintegral’s picture

Here is an updated patch containing install hooks to set the weight of the module if the weight hasn't been changed. It also updates the readme as suggested on IRC.

I'll be committing this shortly.

deviantintegral’s picture

Status: Needs review » Fixed
PieWie’s picture

Status: Fixed » Active

the problem exist also without the OG

on my side now appeared to me this problem

when i click Switch back

Access denied
There are no permissions to view this page.

Roles that are considered "administrator" for masquerading:
admin

Permissions for moduł masquerade
masquerade as admin - admin yes
masquerade as user - admin yes

I use the following modules that have an impact on users

Drupal 6.13
ACL 6.x-1.0
Author Pane 6.x-1.1
Automated Logout 6.x-2.2
Masquerade 6.x-1.1
Protect Critical Users 6.x-1.1
False Account Detector 6.x-2.4

deviantintegral’s picture

Priority: Critical » Normal

Are you running the latest -dev release? Or, have you tried changing module weights as mentioned above?

deviantintegral’s picture

Status: Active » Fixed

Actually, your comment says Masquerade 1.1. So please either upgrade to the latest -dev release, or adjust the weight of the Masquerade module as mentioned above.

PieWie’s picture

thanks

upgrade to dev helps

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.