Conflict of paths

Created on 7 August 2024, 10 months ago

I need to disallow all paths /foo/*, excluding /foo/bar
My attempt:

!/foo/*
/foo/bar

Result: /foo/bar disallowed.
Is there any ways to do it?

✨ Feature request
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

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

Merge Requests

Comments & Activities

  • Pipeline finished with Success
    over 1 year ago
    #18951
  • Pipeline finished with Failed
    over 1 year ago
    Total: 1778s
    #27204
  • Pipeline finished with Canceled
    over 1 year ago
    Total: 13s
    #27219
  • Pipeline finished with Success
    over 1 year ago
    Total: 261s
    #27721
  • Pipeline finished with Success
    over 1 year ago
    Total: 145s
    #58438
  • Pipeline finished with Skipped
    over 1 year ago
    #71763
  • Pipeline finished with Success
    about 1 year ago
    #139256
  • Pipeline finished with Skipped
    about 1 year ago
    #187650
  • Pipeline finished with Success
    12 months ago
    Total: 209s
    #199389
  • Pipeline finished with Failed
    11 months ago
    Total: 146s
    #220785
  • Pipeline finished with Failed
    11 months ago
    Total: 147s
    #220789
  • Issue created by @super_romeo
  • Status changed to Closed: works as designed 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    ! is to exclude the previous wild card pattern.

    For what you want to do, make sure you have the "Hide for the listed pages" checked then:

    /foo/*
    !/foo/bar

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    Thank you for answer.

    But I wanna keep "Show for the listed pages" mode, because I know exactly only paths to show.
    My code:

    /order/*
    !/order/*/*
    /order/*/complete
    

    Is it possible?

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    This case is covered by Condition Path β†’ module (see "Example 2").

  • Status changed to Active 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    I see what you mean. I think your point is very valid. I will follow up with a new update soon to allow linear exclusion.

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    Thank you very much. I'm looking forward to it.

  • Status changed to Needs review 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    @super_romeo - I created a new major version for this as there was a lot to rewrite to accomplish this and fixed some other issues.
    Please try it and let me know if this worked for what you intended.

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    I installed new version. And my Site branding block is disappeared. And contextual menu is corrupted.
    Please see pics.

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

    You are correct, I refined the access adjustment to the block for viewing only as it was altering some admin functions as well.
    Please update to the latest 2.2.x-dev and let me know if it works this time.
    ( you may have manually delete the module's folder from the contrib modules on your setup to force to update.)

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    Thank you for update.

    1. "Site branding" block is still disappeared.

    2. "Site branding" block config fixed.

    3. Cases:
    a)

    !/order/*/*
    /order/*/complete
    

    /order/1/foo - hidden (OK)
    /order/1/complete - visible (OK)

    b)

    /order/*/complete
    !/order/*/*
    

    /order/1/foo - hidden (OK)
    /order/1/complete - hidden (wrong)

    I believe the path order should not depend on the path order.

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

    There is no other way it has to be in order.

    So both examples are not correct, first, you set the allowed or not-allowed setting as you need, The exclusion is to override any previous path patterns.

    Your examples should be:

    A)
    configuration is set to: [x] Hide on pages :
    /order/*/*
    !/order/*/complete

    B)
    configuration is set to: [x] Show on pages:
    /order/*/* <-- This will display your block on paths with this pattern
    !/order/*/complete <-- and this will exclude this specific path pattern, overwriting previous pattern

    But based on your original logic I think what you want is this:

    configuration is set to: [x] Show on pages:
    /order/* <-- will display on ay page after order/
    !/order/*/* <-- exception will hide on any page after order/*/
    /order/*/complete <-- This will take over the exception allowing the block to display on /order/*/complete page

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    Thank you. Got it.
    Now all good except "Site branding block is still disappeared".

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

    What are your patterns on that block?

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    "Hide for the listed pages"

    /trains/order/*/timetable
    /trains/order/*/timetable2
    /trains/order/*/passenger
    /trains/order/*/payment
    

    And block is hidden on /order/modification/3/aa7e50fddf30b0a5384b4b44c916f5c3/passenger.

    I think wildcard /trains/order/*/passenger wrongly applied to this path.

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    Can I hope to have this problem fixed in the future? So that I can plan.

  • Pipeline finished with Failed
    10 months ago
    Total: 37s
    #260497
  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    Working on patch now.

  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    Hello @jcontreras,
    please check.

    Tests as a bonus :)

  • Pipeline finished with Failed
    10 months ago
    Total: 494s
    #261200
  • Pipeline finished with Canceled
    10 months ago
    Total: 127s
    #261236
  • Pipeline finished with Success
    10 months ago
    Total: 137s
    #261238
  • Pipeline finished with Success
    10 months ago
    Total: 139s
    #261369
  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    Hi @super_romeo - Sorry It's been a crazy week last week and will continue on to the next week. I am working on a large project with crazy deadline. I took a quick glance at you changes, and it looks really good.

    Since you did a lot of changes, I'll have to take closer look, pull it all and run some tests and if all good I'll do the merge.

    I'll see if I can carb some time tomorrow as of today I still got a lot to do. Thank you so much for your time on this.

  • Pipeline finished with Canceled
    10 months ago
    Total: 102s
    #264898
  • Pipeline finished with Success
    10 months ago
    Total: 243s
    #265273
  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    @jcontreras, you are welcome!

  • Pipeline finished with Success
    9 months ago
    Total: 151s
    #277322
  • Pipeline finished with Success
    9 months ago
    Total: 204s
    #277839
  • Pipeline finished with Success
    9 months ago
    Total: 141s
    #282580
  • Pipeline finished with Failed
    8 months ago
    Total: 338s
    #299501
  • Pipeline finished with Success
    8 months ago
    Total: 301s
    #301722
  • Pipeline finished with Success
    8 months ago
    Total: 144s
    #310314
  • Pipeline finished with Success
    8 months ago
    Total: 141s
    #310347
  • Pipeline finished with Success
    8 months ago
    #310377
  • Pipeline finished with Skipped
    8 months ago
    #313529
  • Pipeline finished with Canceled
    8 months ago
    Total: 164s
    #318469
  • Pipeline finished with Failed
    8 months ago
    Total: 654s
    #318480
  • Pipeline finished with Success
    7 months ago
    Total: 158s
    #322343
  • Pipeline finished with Success
    7 months ago
    Total: 669s
    #324177
  • Pipeline finished with Failed
    7 months ago
    Total: 647s
    #327227
  • Pipeline finished with Success
    7 months ago
    Total: 248s
    #327343
  • Pipeline finished with Failed
    7 months ago
    Total: 173s
    #337632
  • Pipeline finished with Failed
    7 months ago
    Total: 208s
    #338217
  • Pipeline finished with Skipped
    7 months ago
    #339580
  • Pipeline finished with Success
    7 months ago
    Total: 137s
    #341810
  • Pipeline finished with Success
    6 months ago
    Total: 134s
    #354412
  • Pipeline finished with Failed
    6 months ago
    Total: 136s
    #361151
  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    I moved this to 2.2.0-alpha2 - please review.

  • Pipeline finished with Failed
    6 months ago
    Total: 1014s
    #368789
  • Pipeline finished with Success
    6 months ago
    Total: 196s
    #375752
  • Pipeline finished with Success
    6 months ago
    Total: 143s
    #378150
  • Pipeline finished with Success
    5 months ago
    Total: 189s
    #379131
  • Pipeline finished with Success
    5 months ago
    Total: 425s
    #379938
  • Pipeline finished with Failed
    5 months ago
    #379943
  • Pipeline finished with Failed
    5 months ago
    #379946
  • Pipeline finished with Failed
    5 months ago
    #380314
  • Pipeline finished with Success
    5 months ago
    Total: 332s
    #380331
  • Pipeline finished with Success
    5 months ago
    Total: 149s
    #383759
  • Pipeline finished with Failed
    5 months ago
    Total: 148s
    #389177
  • Pipeline finished with Skipped
    5 months ago
    #401462
  • Pipeline finished with Failed
    5 months ago
    Total: 165s
    #402808
  • Pipeline finished with Success
    4 months ago
    Total: 294s
    #409379
  • Pipeline finished with Success
    4 months ago
    #409951
  • Pipeline finished with Success
    4 months ago
    Total: 149s
    #410219
  • Pipeline finished with Failed
    4 months ago
    Total: 211s
    #414133
  • Pipeline finished with Success
    4 months ago
    Total: 150s
    #414169
  • Pipeline finished with Success
    4 months ago
    Total: 161s
    #415245
  • Pipeline finished with Failed
    4 months ago
    Total: 169s
    #417352
  • Pipeline finished with Success
    4 months ago
    Total: 159s
    #419151
  • Pipeline finished with Success
    4 months ago
    Total: 145s
    #420154
  • Pipeline finished with Success
    4 months ago
    Total: 163s
    #420645
  • Pipeline finished with Success
    4 months ago
    Total: 175s
    #420852
  • Pipeline finished with Success
    4 months ago
    Total: 270s
    #426949
  • Pipeline finished with Success
    4 months ago
    Total: 150s
    #429897
  • Pipeline finished with Success
    4 months ago
    Total: 146s
    #430710
  • Pipeline finished with Failed
    3 months ago
    Total: 166s
    #432184
  • Pipeline finished with Canceled
    3 months ago
    Total: 84s
    #435920
  • Pipeline finished with Failed
    3 months ago
    Total: 176s
    #436971
  • Pipeline finished with Canceled
    3 months ago
    Total: 135s
    #437014
  • Pipeline finished with Success
    3 months ago
    Total: 164s
    #439260
  • Pipeline finished with Canceled
    3 months ago
    Total: 115s
    #442150
  • Pipeline finished with Success
    3 months ago
    Total: 279s
    #444482
  • Pipeline finished with Failed
    3 months ago
    Total: 202s
    #445235
  • Pipeline finished with Success
    3 months ago
    Total: 212s
    #445243
  • Pipeline finished with Success
    3 months ago
    Total: 233s
    #446761
  • Pipeline finished with Success
    3 months ago
    #447679
  • Pipeline finished with Failed
    3 months ago
    Total: 252s
    #448267
  • Pipeline finished with Success
    3 months ago
    Total: 150s
    #450638
  • Pipeline finished with Canceled
    2 months ago
    Total: 85s
    #459889
  • Pipeline finished with Success
    2 months ago
    Total: 243s
    #460754
  • Pipeline finished with Success
    2 months ago
    #465875
  • Pipeline finished with Success
    about 2 months ago
    #469599
  • Pipeline finished with Success
    about 2 months ago
    Total: 189s
    #470220
  • Pipeline finished with Success
    about 2 months ago
    Total: 198s
    #471324
  • Pipeline finished with Success
    about 2 months ago
    Total: 141s
    #471491
  • Pipeline finished with Success
    about 2 months ago
    Total: 132s
    #472278
  • Pipeline finished with Success
    about 2 months ago
    Total: 139s
    #472290
  • Pipeline finished with Success
    about 2 months ago
    Total: 151s
    #473335
  • Pipeline finished with Success
    about 2 months ago
    Total: 313s
    #473444
  • Pipeline finished with Success
    about 2 months ago
    Total: 140s
    #476109
  • Pipeline finished with Failed
    25 days ago
    Total: 219s
    #496899
  • Pipeline finished with Failed
    25 days ago
    Total: 180s
    #496919
  • Pipeline finished with Success
    25 days ago
    Total: 154s
    #497381
  • Pipeline finished with Success
    24 days ago
    Total: 224s
    #498066
  • Pipeline finished with Success
    24 days ago
    Total: 166s
    #498403
  • Pipeline finished with Success
    23 days ago
    Total: 144s
    #499341
  • Pipeline finished with Success
    16 days ago
    Total: 180s
    #505306
  • Pipeline finished with Success
    12 days ago
    Total: 147s
    #507693
  • Pipeline finished with Success
    6 days ago
    Total: 142s
    #512364
  • Pipeline finished with Success
    6 days ago
    Total: 153s
    #512385
  • Pipeline finished with Success
    5 days ago
    Total: 154s
    #513479
  • Pipeline finished with Success
    5 days ago
    Total: 175s
    #514028
  • Pipeline finished with Success
    3 days ago
    Total: 273s
    #515370
Production build 0.71.5 2024