Posted by andypost on November 8, 2012 at 10:33pm
4 followers
| Project: | Masquerade |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
Some minor code cleanup needed to pass coder
Also fixed tests to use token, we needs extended coverage:
1) block
2) API functions
3) admin UI
Comments
#1
Initial patch, fixed code-style and started tests (still not passes switch 404)
#2
A bit extended test. I can't find a proper way to build a token
#3
Some good clean-ups here. Though do you think we could move forward with #1836516: Port Masquerade to D8 and rewrite + simplify it into a new 2.x series first?
+++ b/masquerade.module@@ -252,6 +252,7 @@ function masquerade_menu_access($type, $uid = NULL) {
function masquerade_admin_settings() {
+ drupal_set_message(user_access('masquerade as user') ? 'Allowed' : 'Disallowed');
?
+++ b/masquerade.module@@ -359,14 +360,15 @@ function _masquerade_user_load($username) {
+ // @TODO Seems this useless.
cache_clear_all($user->uid, 'cache_menu', TRUE);
Yep, also noticed those. Seem to date back to D5.
#4
@sun thanx for review, this is a dubuggin staff - I'm trying to debug the session that should be fixed in #1555862: DrupalWebTestCase::drupalGetToken() does not add hash salt
patch includes additional cleanups from #1836516: Port Masquerade to D8 and rewrite + simplify it into a new 2.x series
#5
The final patch I'm going to commit to D7
#6
Another rount to pass tests
#7
The last submitted patch, 1835954-masquerade-6.patch, failed testing.