How do I give a user/role access to the registrant entity page (/events/xxx/registrations/xxx)? I see in the routing file that permission is given to registrant.view, but I don't see that permission setting in /admin/people/permissions.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ryankavalsky created an issue. See original summary.

owenbush’s picture

Issue tags: +rc eligible

This is a good spot, although not quite the right thing.

Registrants have their own access control handler. [entity-name].view is kind of a special access control, and not a specific permission.

Instead you need to look in Drupal\recurring_events_registration\RegistrantAccessControlHandler::checkAccess and find where it specifies the access control for 'view'. In this case, it expects a user to have the "view registrant entities" permission. That is the permission you need to grant, however, that permission does not seem to exist in the recurring_events_registration.permissions.yml file, so it needs to be added there.

ryankavalsky’s picture

Thanks for the tip! I've posted the patch here.

owenbush’s picture

Status: Active » Needs review

This looks good to me. I'll get it merged later today/this week. Thanks for the quick turnaround.

owenbush’s picture

Status: Needs review » Fixed

This looked good. I have merged it into the latest dev branches for 8.x-1.x and 2.0.x, it will be in rc2 when that comes out.

Thanks for the patch.

Status: Fixed » Closed (fixed)

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