Closed (won't fix)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 Aug 2012 at 13:57 UTC
Updated:
15 Dec 2012 at 11:35 UTC
This module allows to "close" site from the unregistered users. Only users who have a username and password to access to your site will be able to view the content of the site.
The module checks whether the user is in the system, and if not, redirects him on the page "access denied", where the user can find login form for the site.
Drupal 7 only.
http://drupal.org/sandbox/redhead/1468992
git clone --recursive --branch master
redhead@git.drupal.org:sandbox/redhead/1468992.git closed_site
cd closed_site
Comments
Comment #1
klausiWelcome,
We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #2
ColonelForbinX commentedThis short and sweet module works as advertised: a single on/off checkbox acts as a killswitch for making the site content unavailable to anonymous traffic, and turns the homepage into a user login page with a custom title. Here's a short list of issues from my review:
Comment #3
Milena commentedHow does this module differ from standard access content permission and http://drupal.org/project/r4032login module working together?
Automatic review
An automated review through coder found 11 normal and 1 minor warnings.
closed_site.module
close_site.install
Manual review
You are working in the master branch in git. You should move your code to a version specific branch.
drupal_add_http_header($_SERVER['SERVER_PROTOCOL'], ' 403 Forbidden');Why not use drupal_access_denied()?
'access arguments' => array('access content'),
What if user will not have access content permission? He or she will not be able to log in. Otherwise user will always stay as logged out user even if have an active account. Very nasty situation, especially for unexperienced users who does not know structure of Drupal database to fix it.
This menu item setting should always be TRUE!
About an .install file...
Imagine I wrote a module called closed_site_backport not dependent on your module, just something new. When I will uninstall your module all of my variables will probably be uninstalled too because of the similar module name we share and Drupal naming conventions. variable_del() is a safer choice considering you use only three variables.
I believe this module is an overkill. It provide similar functionality to modules that already exists.
@ColonelForbinX
I'm sorry for getting into your way in reviewing this module. Just didn't notice while posting :)
Comment #4
Milena commentedComment #5
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.