Project:Restrict Login or Role Access by IP Address
Version:6.x-1.0-beta2
Component:Code
Category:feature request
Priority:normal
Assigned:james_g
Status:closed (fixed)

Issue Summary

User 1 might actually the user that tech wants tied to a couple of IP ranges the most, as it carries the keys to the kingdom.

This bypass might be an optional checkbox (variable_set('restrict_by_ip_restrict_user_1', '$checkbox_val')) on the settings form, carrying with it suitable warning.

@@ -97,7 +97,7 @@ function _restrict_by_ip_login(&$user
- if ($user -> uid > 1) {
+ if (($user -> uid == 1 && variable_get('restrict_by_ip_restrict_user_1', 'no') == 'yes') || $user -> uid > 1) {

Comments

#1

I needed this as well, so here is a patch that adds a checkbox to the settings page to allow for restricting user 1 by IP as well (And a warning message).

It would be great to add this as a feature of the next release.

AttachmentSize
restrict_by_ip-[#415902].patch 2.22 KB

#2

Status:active» needs review

#3

Looks like the attachment didn't work correctly, here is an updated attachment.

AttachmentSize
restrict_by_ip-415902.patch 2.22 KB

#4

Assigned to:Anonymous» james_g
Status:needs review» closed (fixed)

Resolved in 6.x-3.x.
There is no checkbox, but the settings have been moved to a single place with a list of all user restrictions. User 1 has been added to the top of the list.
User 1 is now properly logged out if not within the specified range of valid IP addresses.

nobody click here