Description
The Masqueradedit module is a simple module that interacts with the Masquerade module to allow a user with the correct permissions to edit a node whilst masquerading as its author.
The Masquerade module provides a simple framework for a user to view a Drupal site as another user, but the process for editing a node as its author has a long tail: find the node, identify the author, find the author, masquerade as that author, find the node again, edit the node. Masqueradedit is intended to simplify that process by providing a single-click function to edit the node as its author, and return to your actual user account when leaving the node edit form.
Project page
https://drupal.org/sandbox/mrdalesmith/2170047
Git repo
git clone --branch 7.x-1.x
http://git.drupal.org/sandbox/MrDaleSmith/2170047.git masqueradedit
cd masqueradedit
Comments
Comment #1
PA robot CreditAttribution: PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
msmithcti CreditAttribution: msmithcti commentedRan the project through http://pareview.sh/, a couple of minor issues:
There is still a master branch, make sure to set the correct default branch: http://drupal.org/node/1659588 . Then remove the master branch, see also step 6 and 7 in http://drupal.org/node/1127732
Review of the 7.x-1.x branch:
Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
DrupalPractice has found some issues with your code, but could be false positives.
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
Source: http://pareview.sh/ - PAReview.sh online service
Comment #3
MrDaleSmith CreditAttribution: MrDaleSmith commentedCheers for the review: I *think* those two errors are false positives: the 97 character line is caused by a long URL - the only way I could fix is to use a link shortener, which might cause security concerns for some users. The unused variable is at DB update with an ->execute.
Updated the repo to remove the master branch.
Thanks again!
pds
Comment #4
deepakaryan1988Hi MrDaleSmith,
I have check it on my local machine, it is working fine. I didn't find any bug though which is great!!!
:)
Comment #5
deepakaryan1988Comment #6
MrDaleSmith CreditAttribution: MrDaleSmith commentedCheers Deepak.
Comment #7
pfaocle> 93 | WARNING | Unused variable $revision_uid_updated
Could this be avoided by not assigning the return value to anything? It would contain the number of rows affected, which isn't subsequently used.
Comment #8
MrDaleSmith CreditAttribution: MrDaleSmith commentedObviously I'm an idiot - of course I can use the return from that DB call. Thanks pfaocle: I'll make a change ASAP.
Comment #9
DavidPetit CreditAttribution: DavidPetit commentedHi !
First of all, you can improve the git description in this topic by replacing:
by:
Concernning the README.txt file, it's good and very detailed. Concerning the tabs, I think you can warn user that they have to display tabs in their theme. It can happen that a theme hides or does not display tabs (or use custom links for admin/edit links).
When using it, it was working as designed. I think the default tab title should be "edit as author". With "edit as user" we don't understand which user it's about.
Moreover, I think it would be great to have this edit link in contextual links (for nodes teasers for example).
Concerning the code in the module, you should put the title in the hook_menu in t(), so that it's tranlatable.
That's all I see. Thanks for this module which can be really useful when you need to edit a node as the author.
Comment #10
MrDaleSmith CreditAttribution: MrDaleSmith commentedCheers for that David - some good suggestions, which I'll get into the code. Just one thing though - hook_menu titles shouldn't be enclosed in t(), as the title callback defaults to t(). You get an error in codesniffer if you do enclose it.
Comment #11
DavidPetit CreditAttribution: DavidPetit commentedYes, you're right ! The callback defaults to t() as stated in there : https://api.drupal.org/api/drupal/modules%21system%21system.api.php/func...
Comment #12
kscheirerNon-blocking issues:
module_exists('masquerade')
check in masqueradedit_access(). Since it's declared as a dependency, it will always be enabled when your module is runningThanks for your contribution, MrDaleSmith!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #13
MrDaleSmith CreditAttribution: MrDaleSmith commentedWow - magic: thanks kscheirer. Will get those improvements added.