Problem/Motivation

The "Access verification form" permission has been created for each verify email form, but does not currently limit access.

Steps to reproduce

Create a verify email form. Check permissions page and confirm no access has been granted. Visit verify email form as anonymous user, and confirm form is shown.

Proposed resolution

The form should deny access to users without the "Access verification form" permission for that form type.

Remaining tasks

  1. In /src/routing/VerifyEmailRoutes, for both routes created per entity, change '_access' => 'TRUE' to '_permission' => "access verify $entity_id"
  2. In VerifyEmailRoutingTest:
    • Add a property called "accessUser".
    • In setUp, create a user with "access verify verify_email_test" and assign to "accessUser" property.
    • In testVerifyEmailRoute, assert access denied (403) when accessing "/verify-email-form" as anonymous user, then log in as "accessUser", and load "/verify-email-form", and confirm success (200).
    • In testInvalidEmail, insert login as "accessUser".
    • In testVerifyEmailForm, insert login as "accessUser" at start.
  3. I think all other tests should pass without change, but this will need to be confirmed.

User interface changes

Permissions will need to be set to allow access to verification forms.

API changes

None.

Data model changes

None.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lostcarpark created an issue. See original summary.

lostcarpark’s picture

Issue summary: View changes
ritarshi_chakraborty’s picture

Working on it.

ritarshi_chakraborty’s picture

Status: Active » Needs review

I have tested the changes locally and it's working perfectly for me.

lostcarpark’s picture

I love how simple this change turned out to be, while improving the flexibility of the module quite a lot. Thank you for working on it.

I have reviewed the change and tested locally, and I'm happy that it's working correctly.

Moving to RTBC.

lostcarpark’s picture

Status: Needs review » Reviewed & tested by the community

lostcarpark’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for working on this @ritarshi_chakraborty!

Successfully merged, contribution credit awarded, and moved to fixed.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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