Created on 31 August 2021, almost 3 years ago
Updated 19 April 2023, about 1 year ago

It would be great if we could use the wildcard (*) character in the general settings of the configuration page. Is this in the works?

✨ Feature request
Status

Needs review

Version

2.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States solarDog

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States crutch

    This patch applies to 2.0.x-dev, however I'm not getting the results as expected, but I may not have the configuration correct

    example 1 when using

    instructor-resources|access-denied-403 (this works)
    instructor-resources/unit-01|access-denied-403 (this is not working, even without patch)

    example 2 when using

    instructor-resources|access-denied-403 (this works)
    instructor-resources/*|access-denied-403 (this is not working)

  • Status changed to Needs work about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States ikphilip Charlotte, NC, USA

    When all paths are prefixed with a forward-slash (/) the matchPath function works as expected. Therefore the documentation for user input should be updated.

    Upon further investigation I've found with release 2.0.0 (no patch) paths that aren't prefixed with forward-slash do not work correctly. I think that the input description (src/Form/PagesRestrictionSettingsForm.php:64) is incorrect. It also conflicts with the example configuration screenshot on the project landing page.

    All this to say, we'll want a new patch that updates the description and either upgrades the stored paths or prefixes paths with a forward slash if none is found.

  • πŸ‡ΊπŸ‡ΈUnited States ikphilip Charlotte, NC, USA

    Updated patch #6:

    1. Uses PathMatcher::matchPath() method.
    2. Adds and utilizes a preparePath() method in src/Event/PagesRestrictionSubscriber.php which in addition to filtering and trimming the URL now prefixes the path with a forward-slash. This should suffice so that URLs which match the instructions work properly. This method is also called in src/Event/PagesRestrictionSubscriber.php in cases where paths were filtered and trimmed.
  • Status changed to Needs review about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States ikphilip Charlotte, NC, USA
  • πŸ‡ΊπŸ‡ΈUnited States crutch

    Thank you ikphilip. I have tried the patch on localhost dev http://localhost/bnd91/web/ and have some results.

    1. When using only this 1 entry in the general settings

    /educational-resources/elearning/what-does-it-mean-have-cgmp-mindset|access-denied-403

    - It seems to be working for using or not using the forward slash in front
    - URL structures are also now working.
    - when forwarding to access denied page it is going to localhost/access-denied-403 which doesn't exist. It may need a base path so it will go to http://localhost/bnd91/web/access-denied-403
    - flushing all caches seem to assure that new settings are current

    2. Test if access denied is unique by forwarding to home page

    /educational-resources/elearning/what-does-it-mean-have-cgmp-mindset|home

    - results are the same, when forwarding to home it is going to localhost/home.

    3. Test a url structure to a target with a url structure

    /educational-resources/elearning/molarity|life-science-degree-programs/medical-laboratory-technology

    - url structures seem to work correctly on both sides of the setting
    - has same base path issue in #1 and 2
    - unsure about using a forward slash at the front of the target

    4. Test wildcard

    - This works correctly
    - has same base path issue in #1 and 2

    5. Test allow roles to bypass

    - Works correctly

Production build 0.69.0 2024