Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3329
autopromote.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 9:27 PM
2014-11-21 21:27:15 (UTC+0)
Size
1009 B
Referenced Files
None
Subscribers
None
autopromote.patch
View Options
Index: includes/Autopromote.php
===================================================================
--- includes/Autopromote.php (revision 44543)
+++ includes/Autopromote.php (working copy)
@@ -109,6 +109,10 @@
case APCOND_INGROUPS:
$groups = array_slice( $cond, 1 );
return count( array_intersect( $groups, $user->getGroups() ) ) == count( $groups );
+ case APCOND_ISIP:
+ return $cond[1] == wfGetIP();
+ case APCOND_IPINRANGE:
+ return IP::isInRange( wfGetIP(), $cond[1] );
default:
$result = null;
wfRunHooks( 'AutopromoteCondition', array( $cond[0], array_slice( $cond, 1 ), $user, &$result ) );
Index: includes/Defines.php
===================================================================
--- includes/Defines.php (revision 44543)
+++ includes/Defines.php (working copy)
@@ -224,3 +224,5 @@
define( 'APCOND_AGE', 2 );
define( 'APCOND_EMAILCONFIRMED', 3 );
define( 'APCOND_INGROUPS', 4 );
+define( 'APCOND_ISIP', 5 );
+define( 'APCOND_IPINRANGE', 6 );
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2898
Default Alt Text
autopromote.patch (1009 B)
Attached To
Mode
T9492: Feature: grant privileges to certain IP address ranges.
Attached
Detach File
Event Timeline
Log In to Comment