Install
Works with Drupal: ^8 || ^9 || ^10Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
81.05 KB
MD5: 2b9720adaec0a2323cafdf6e53983a5a
SHA-1: 90d0374a022a4d84edf596fb05cce18e6638fd22
SHA-256: 409563a122fde41708cd7c900f206f20de8aafe2a786b9ef6a1133d0995e5b86
Download zip
159.21 KB
MD5: e66859cba51c2274c65e2327d00f7ffe
SHA-1: cf3506e64d54da51cc5f72fc1fe5813c0f35536d
SHA-256: f837b0f876464d5c942d33763a32680477eed1e820d2414d8eeaca874cdbf469
Release notes
Feature
- Add drush command - access-policy:check-access
- Add ability to disable queries on access policies.
- Add new access rules for string and numeric values.
- Add new operators including: is not equal to, ends with, not ends with, starts with and not starts with.
- Include the entity type label in “Bypass access rule restriction” permission to distinguish between entity types.
- Various minor ui and label changes.
Bug
- Performance improvement: content_access_policy table index missing*
- #3334691 by partdigital, GarChris: Access Policy errors when Book nodes exist
- Unpublished content should not appear on listing pages.
- Access rule admin label not appearing on Access rule table.
- Access rule field widget should be disabled for non-translatable fields.
- Incorrect permission returned - use untranslated string for generating permission names.
Tasks
- Create new AccessPolicyValidator service and capture violations during validation.
- Handle query alter with new AccessRuleQueryHandler, deprecate AccessRule::queryAlter() method.
- Create SqlQuery object and deprecate SelectQueryStub.
- AccessPolicyEntityForm extends EntityForm
*Known performance issue
This release addressed an issue where the content_access_policy table was not properly indexed causing performance issues. If you've installed an earlier version of access policy and are experiencing performance issues on your site add this update hook to a module.
Note: Given how much the module could change during the alpha phase we have adopted a policy of not including update hooks until after 1.0.
/**
* Update content_access_policy entity index.
*/
function module_update_8001() {
$schema = Database::getConnection()->schema();
if (!$schema->indexExists('content_access_policy', 'content_access_policy__lookup')) {
$fields = [
'content_entity_type_id',
'content_entity_id',
];
$schema->addUniqueKey('content_access_policy', 'content_access_policy__lookup', $fields);
}
}