10up/restricted-site-access

Name: restricted-site-access

Owner: 10up

Description: Limit access to visitors who are logged in or allowed by IP addresses. Includes many options for handling blocked visitors.

Created: 2016-02-03 03:29:38.0

Updated: 2018-01-06 00:22:59.0

Pushed: 2018-01-05 14:58:44.0

Homepage: http://10up.com/plugins/restricted-site-access-wordpress/

Size: 521

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Restricted Site Access

Limit access your site to visitors who are logged in or accessing the site from a set of specified IP addresses. Send restricted visitors to the log in page, redirect them, or display a message or page. A great solution for Extranets, publicly hosted Intranets, or parallel development / staging sites.

Adds a number of new configuration options to the Reading settings panel. From this panel you can:

Installation
  1. Install easily with the WordPress plugin control panel or manually download the plugin and upload the extracted folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the “Plugins” menu in WordPress
  3. Configure the plugin by going to the Settings › Reading page in WordPress.
Frequently-asked Questions
Where do I change the restriction settings?

Restricted Site Access settings are added to the Reading page, with WordPress?s built in site privacy options. (It was moved there from a separate Privacy settings page in 3.5.)

It?s not working! My site is wide open!

Most commonly, Restricted Site Access is not compatible with some page caching solutions. While the plugin hooks in as early as it can to check visitor permissions, its important to understand that some page caching plugins generate static output that prevents plugins like Restricted Site Access from ever checking individual visitors.

To the extent that sites blocked by this plugin should not need to concern themselves with high scale front end performance, we strongly recommend disabling any page caching solutions while restricting access to your site. Keep in mind that most page caching plugins do not cache the ?logged in? experience, anyhow. Also note that the plugin is fully compatible with other caching layers, like the WordPress object cache.

How do I allow access to specific pages or parts of my site? =

Developers can use the restricted_site_access_is_restricted filter to override normal restriction behavior. Note that restriction checks happen before WordPress executes any queries; it passes the query request from the global $wp variable so developers can investigate what the visitor is trying to load.

For instance, to unblock an RSS feed, place the following PHP code in the theme's functions.php file or in a simple plug-in:

filter( 'restricted_site_access_is_restricted', 'my_rsa_feed_override', 10, 2 );

tion my_rsa_feed_override( $is_restricted, $wp ) {
// check query variables to see if this is the feed
if ( ! empty( $wp->query_vars['feed'] ) ) {
    $is_restricted = false;
}
return $is_restricted;

How secure is this plug-in?

Visitors that are not logged in or allowed by IP address will not be able to browse your site (though be cautious of page caching plugin incompatibilities, mentioned above). Restricted Site Access does not block access to your, so direct links to files in your media and uploads folder (for instance) are not blocked. It is also important to remember that IP addresses can be spoofed. Because Restricted Site Access runs as a plug-in, it is subject to any other vulnerabilities present on your site.

Restricted Site Access is not meant to be a top secret data safe, but simply a reliable and convenient way to handle unwanted visitors.

License

Restricted Site Access is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.