What happens when there are multiple plugins enabled?

Created on 19 February 2025, 2 months ago

Problem/Motivation

The module allows multiple plugins to run together, but it's not clear about how the access is granted whenever there are two plugins enabled.

Steps to reproduce

In case that paywall is configured as:

1 - check for permission 'access kingdom'.
2 - check for role 'editor'.

To be checked in blog entry content.

User without 'access kingdom' permission but with role 'editor' visits a blog entry.
When evaluating:
1- check for permission 'access kingdom': evaluates false.
2- check for role 'editor': evaluates true.
Access will be granted?

Looking at code in https://git.drupalcode.org/project/role_paywall/-/blob/2.1.x/src/RolePay... seems that access will be granted because manager looks for TRUE from checkAccess .

So it seems ok! So the only thing missed here is that it needs to be documented somewhere ?

💬 Support request
Status

Active

Version

2.1

Component

Code

Created by

🇪🇸Spain aleix

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @aleix
  • 🇦🇺Australia akoepke

    Access will be granted if ANY of the RolePaywallAccessRule plugins return true. The first plugin that returns true will result in access being granted and no further rules will be evaluated.

Production build 0.71.5 2024