This module enables an alternative way of rebuilding node permissions. This is useful for websites with a very large amount of nodes.
What is different from the core way
Does not delete everything when starts from node_access table - instead it only deletes the rows that it will update so that users will still see all content while they browse the website.
Batch INSERT statements - instead of creating massive amount of INSERT queries for each node it process, the module collects the grants in batches and creates one big INSERT query that does not load the database as much. The batch limit is configurable before starting the rebuild.
Configure number of nodes to process - you can now select how many nodes you want to process for one batch operation.
New permission - since some people, who probably should not rebuild the permissions, can have access the admin pages and start the procedure, the module provides a new permission just to initiate the rebuild process.
This is a Drupal 7 only module.
project page: https://www.drupal.org/sandbox/skein/2410909
git: git clone http://git.drupal.org/sandbox/skein/2410909.git npr
Comments
Comment #1
skein commentedComment #2
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
cfischer83 commentedThis is an excellent, well written module. I would make some suggestions in the following priority.
#3 isn't required, the README might be, and the form validation is good practice.
Comment #4
skein commentedHi cfischer
Thanks for the review
1. Instead of a validator function I have added validators on the elements since no need to reinvent the wheel. Now only positive integers are allowed.
2. Refactored README.txt
3. Refactored queries to use db_select
Please review the changes.
Thank you.
Comment #5
cfischer83 commentedHi skein,
This looks great! Well done!
Comment #6
chandan chaudhary commentedHi skein,
There is a possible security threat in your module,
Look for npr.module line # 16
'access callback' => TRUE,This will allow anonymous user to configure your module settings page.
Remove the above mention line.
Comment #7
klausiYep, that looks like a security issue. And please don't remove the security tag, we keep that for statistics and to show examples of security problems.
Comment #8
skein commentedHi Chandan
Great spot. I accidentally left it behind while in the testing stage.
It is now fixed.
Comment #9
kristougher commentedI have not done extremely thorough testing but the module seems to work and I can confirm that the issue mentioned in #6 has been fixed.
One suggestion can be to save the values entered when rebuilding.
Comment #10
kristougher commentedComment #11
cweagansThanks for your contribution!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.