Extra permission to restrict the canonical poll page

Created on 22 February 2023, over 1 year ago

Problem/Motivation

We have a use case where you should not be able to access the canonical /poll/{poll} page. Since the entity view permission is shared with the canonical page view permission it's not possible to disable the canonical page via permissions.

Steps to reproduce

See description.

Proposed resolution

Add an extra permission and utilise it for the canonical URL.

Remaining tasks

Provide patch/mr

User interface changes

N/A

API changes

N/A

Data model changes

N/A

✨ Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium BramDriesen Belgium πŸ‡§πŸ‡ͺ

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

Comments & Activities

  • Issue created by @BramDriesen
  • @bramdriesen opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • πŸ‡§πŸ‡ͺBelgium BramDriesen Belgium πŸ‡§πŸ‡ͺ

    Merge request created

  • Assigned to adammalone
  • Status changed to Active over 1 year ago
  • πŸ‡¨πŸ‡­Switzerland Berdir Switzerland

    this is much trickier than you think because the canonical page is always used for the form submission, you will need to set up a custom request subscriber or so that only disallows GET requests.

    It would also require an update function to grant that permission to users that already are allowed to see polls, and a lot of test updates as you can see.

    Honestly, I'm not really interested in supporting this use case and am strongly considering to mark this as won't fix.

  • πŸ‡¨πŸ‡­Switzerland Berdir Switzerland
  • Issue was unassigned.
  • Status changed to Needs work over 1 year ago
  • πŸ‡¨πŸ‡­Switzerland Berdir Switzerland
  • πŸ‡§πŸ‡ͺBelgium BramDriesen Belgium πŸ‡§πŸ‡ͺ

    @Berdir that I obviously didn't think of. So the request subscriber would be the way to go?

Production build 0.69.0 2024