"Access denied" when unswitching with Organic Groups installed
ceardach - May 16, 2009 - 23:31
| Project: | Masquerade |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
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.

#1
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.
#2
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.
#3
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. :/
#4
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.
#5
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.
#6
Hmm, just read #324934: Conflict with global redirect module. Perhaps we should be setting the weight of Masquerade then?
#7
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.
#8
#9
the problem exist also without the OG
on my side now appeared to me this problem
when i click
Switch backAccess 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
#10
Are you running the latest -dev release? Or, have you tried changing module weights as mentioned above?
#11
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.
#12
thanks
upgrade to dev helps
#13
Automatically closed -- issue fixed for 2 weeks with no activity.