Move session->env->getIp into session->request->address
This commit is contained in:
parent
565cf955d7
commit
005b9da1ac
20 changed files with 49 additions and 48 deletions
|
|
@ -24,5 +24,5 @@ cmp_ok($session->env->get("REMOTE_ADDR"), 'ne', "", "get() one valid entry");
|
|||
|
||||
my $env = $session->env;
|
||||
$session->request->env->{REMOTE_ADDR} = '192.168.0.2';
|
||||
is ($env->getIp, '192.168.0.2', 'getIp');
|
||||
#is ($env->getIp, '192.168.0.2', 'getIp');
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ WebGUI::Test->interceptLogging( sub {
|
|||
is($log_data->{warn}, "Second warning", "warn: Log4perl called again");
|
||||
$eh->security('Shields up, red alert');
|
||||
my $security = sprintf '%s (%d) connecting from %s attempted to %s',
|
||||
$session->user->username, $session->user->userId, $session->env->getIp, 'Shields up, red alert';
|
||||
$session->user->username, $session->user->userId, $session->request->address, 'Shields up, red alert';
|
||||
is($log_data->{warn}, $security, 'security: calls warn with username, userId and IP address');
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -289,6 +289,7 @@ ok($adminSiteWideTag->get(q{isSiteWide}), 'versionTagMode siteWide + admin inher
|
|||
ok($adminSiteWideTag->getId() eq $siteWideTagId, 'versionTagMode siteWide + admin inherited: empty has same ID as site wide');
|
||||
|
||||
|
||||
$adminUserTag->rollback();
|
||||
$admin_session->var()->end();
|
||||
$admin_session->close();
|
||||
|
||||
|
|
@ -314,7 +315,6 @@ isnt(
|
|||
|
||||
$userTag->rollback();
|
||||
$siteWideTag->rollback();
|
||||
$adminUserTag->rollback();
|
||||
|
||||
## Additional VersionTagMode to make sure that auto commit happens only when user is tag creator and tag is not site wide.
|
||||
## See bug #10689 (Version Tag Modes)
|
||||
|
|
@ -329,7 +329,6 @@ $adminUserTag->rollback();
|
|||
|
||||
# create admin session
|
||||
my $admin_session = WebGUI::Test->newSession;
|
||||
WebGUI::Test->addToCleanup($admin_session);
|
||||
$admin_session->user({'userId' => 3});
|
||||
|
||||
setUserVersionTagMode($admin_session->user(), q{autoCommit});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue