I would like to set it up on the site so that the default is that no roles can see a book, and that they all have to be assigned. This way, managers can't create page that is only for managers, and forget to remove the authenticated users access. If that were to happen, it wouldn't be good.

Anyways, I like the module. Please keep up the good work on it.

Comments

Anonymous’s picture

Title: It would be nice to be able to set defaults for what roles are able to see books » Add a settings page for the module global settings

It would also be useful if it would be possible to change the priority of the access rules added by the module to resolve conflicts with other similar modules. I changed the title to reflect the extended feature.

jaypan’s picture

Unfortunately, access modules all conflict due to the nature of Drupal's access system. Any module that grants permission takes priority over any module that denies permission.

Anonymous’s picture

Drupal core code allows modules to define the priority of a node access permission.
Book access uses a constant for that field, which makes the field useless; other access modules allow to change the priority using an option, and I take there is a reason to do so.

There are then other settings that could be added, and that could alter the user interface of the module.

jaypan’s picture

Even when priority is set, any module that gives access takes priority over one that doesn't give access. This is because db_rewrite_sql does a join on the node_access table, and looks for a value of one. So even if another module has a value of zero (denying access), the join finds the value of one (give access), and the value of zero is ignored. This is why it's best to not use multiple access modules - the results can be unpredictable.

Anonymous’s picture

Title: Add a settings page for the module global settings » Add an option for the node access default values

Even when priority is set, any module that gives access takes priority over one that doesn't give access.

That is true; modules can just grant access, and not remove it. The settings to change the priority would not have any sense, in such case.

I had in mind an option to disable the integration with CheckAll, but considering that module has stable code, the option is probably not necessary.

Thanks for your help.

Anonymous’s picture

Version: 6.x-1.0-rc2 » 6.x-1.0-rc5
Status: Active » Fixed

I added the settings for the default access values for both the new roles, and the new users.
Thanks for your report, and help.

jaypan’s picture

Thank you! That's great.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.