Skip to content
Snippets Groups Projects
Commit 30cb4ed2 authored by Ingo Renner's avatar Ingo Renner Committed by Oliver Hader
Browse files

[FEATURE] Add devIP as keyword for IP condition

When using an IP condition, support using keyword "devIP" to compare
the current Request IP against the devIpMask setting.

Usage:
[IP = devIP]
page.20 = TEXT
page.20.value = Hello Developer!
[end]

Fixes: #50092
Documentation: #52827
Releases: 6.2
Change-Id: I6b9128a9ac23b8d24ec1874dbe477503b20b58b8
Reviewed-on: https://review.typo3.org/24754
Reviewed-by: Ernesto Baschny
Reviewed-by: Gaëtan MARMASSE
Tested-by: Gaëtan MARMASSE
Reviewed-by: Paul Rohrbeck
Tested-by: Paul Rohrbeck
Reviewed-by: Dmitry Dulepov
Tested-by: Dmitry Dulepov
Reviewed-by: Oliver Hader
parent 0ac4ab56
Branches
Tags
No related merge requests found
......@@ -305,6 +305,10 @@ abstract class AbstractConditionMatcher {
}
break;
case 'IP':
if ($value === 'devIP') {
$value = trim($GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask']);
}
if (GeneralUtility::cmpIP(GeneralUtility::getIndpEnv('REMOTE_ADDR'), $value)) {
return TRUE;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment