Conflict of paths

Created on 7 August 2024, about 1 year 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
    #139903
  • Pipeline finished with Success
    over 1 year ago
    Total: 208s
    #182736
  • Issue created by @super_romeo
  • Status changed to Closed: works as designed about 1 year 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 about 1 year 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 about 1 year 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.

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

    Working on patch now.

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

    Hello @jcontreras,
    please check.

    Tests as a bonus :)

  • Pipeline finished with Failed
    about 1 year ago
    Total: 494s
    #261200
  • Pipeline finished with Canceled
    about 1 year ago
    Total: 127s
    #261236
  • Pipeline finished with Success
    about 1 year ago
    Total: 137s
    #261238
  • Pipeline finished with Success
    about 1 year 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 Success
    about 1 year ago
    #262399
  • Pipeline finished with Success
    about 1 year ago
    Total: 203s
    #262854
  • Pipeline finished with Success
    about 1 year ago
    Total: 235s
    #264902
  • Pipeline finished with Success
    about 1 year ago
    Total: 285s
    #265224
  • Pipeline finished with Failed
    about 1 year ago
    Total: 143s
    #271208
  • Pipeline finished with Failed
    about 1 year ago
    Total: 201s
    #271274
  • Pipeline finished with Failed
    about 1 year ago
    Total: 188s
    #271321
  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    @jcontreras, you are welcome!

  • Pipeline finished with Failed
    about 1 year ago
    #274515
  • Pipeline finished with Skipped
    about 1 year ago
    #276006
  • Pipeline finished with Success
    about 1 year ago
    Total: 148s
    #288906
  • Pipeline finished with Success
    about 1 year ago
    Total: 139s
    #289040
  • Pipeline finished with Success
    12 months ago
    #318596
  • Pipeline finished with Skipped
    12 months ago
    #320964
  • Pipeline finished with Failed
    12 months ago
    Total: 145s
    #324013
  • Pipeline finished with Failed
    12 months ago
    Total: 1150s
    #324175
  • Pipeline finished with Canceled
    12 months ago
    Total: 107s
    #324625
  • Pipeline finished with Success
    12 months ago
    Total: 390s
    #327335
  • Pipeline finished with Success
    12 months ago
    Total: 194s
    #327566
  • Pipeline finished with Success
    11 months ago
    Total: 153s
    #333119
  • Pipeline finished with Success
    11 months ago
    Total: 157s
    #333121
  • Pipeline finished with Success
    11 months ago
    Total: 159s
    #337598
  • Pipeline finished with Success
    11 months ago
    Total: 231s
    #338225
  • Pipeline finished with Success
    11 months ago
    Total: 197s
    #344246
  • Pipeline finished with Success
    11 months ago
    Total: 165s
    #348043
  • Pipeline finished with Success
    11 months ago
    Total: 209s
    #359350
  • Pipeline finished with Success
    10 months ago
    Total: 355s
    #361154
  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    I moved this to 2.2.0-alpha2 - please review.

  • Pipeline finished with Failed
    10 months ago
    Total: 145s
    #368728
  • Pipeline finished with Success
    10 months ago
    Total: 169s
    #372172
  • Pipeline finished with Success
    10 months ago
    Total: 126s
    #372190
  • Pipeline finished with Failed
    10 months ago
    #379859
  • Pipeline finished with Success
    10 months ago
    Total: 158s
    #379861
  • Pipeline finished with Failed
    10 months ago
    Total: 148s
    #383753
  • Pipeline finished with Success
    10 months ago
    Total: 153s
    #383857
  • Pipeline finished with Success
    9 months ago
    Total: 237s
    #386303
  • Pipeline finished with Failed
    9 months ago
    Total: 147s
    #388909
  • Pipeline finished with Success
    9 months ago
    Total: 136s
    #389922
  • Pipeline finished with Failed
    9 months ago
    Total: 176s
    #402817
  • Pipeline finished with Failed
    9 months ago
    Total: 228s
    #404376
  • Pipeline finished with Failed
    9 months ago
    Total: 773s
    #407629
  • Pipeline finished with Canceled
    9 months ago
    Total: 86s
    #410207
  • Pipeline finished with Success
    9 months ago
    Total: 184s
    #413358
  • Pipeline finished with Failed
    8 months ago
    Total: 274s
    #420884
  • Pipeline finished with Success
    8 months ago
    Total: 144s
    #428681
  • Pipeline finished with Success
    8 months ago
    Total: 146s
    #430736
  • Pipeline finished with Skipped
    8 months ago
    #435461
  • Pipeline finished with Success
    8 months ago
    Total: 144s
    #439891
  • Pipeline finished with Success
    8 months ago
    Total: 174s
    #439990
  • Pipeline finished with Success
    7 months ago
    #443106
  • Pipeline finished with Success
    7 months ago
    Total: 235s
    #445272
  • Pipeline finished with Success
    7 months ago
    Total: 194s
    #446426
  • Pipeline finished with Failed
    7 months ago
    Total: 273s
    #447892
  • Pipeline finished with Success
    7 months ago
    Total: 141s
    #447931
  • Pipeline finished with Failed
    7 months ago
    Total: 185s
    #459890
  • Pipeline finished with Failed
    7 months ago
    Total: 241s
    #460738
  • Pipeline finished with Failed
    7 months ago
    Total: 222s
    #460742
  • Pipeline finished with Canceled
    7 months ago
    Total: 322s
    #460743
  • Pipeline finished with Success
    7 months ago
    Total: 230s
    #461297
  • Pipeline finished with Success
    7 months ago
    Total: 141s
    #462422
  • Pipeline finished with Success
    6 months ago
    Total: 158s
    #468440
  • Pipeline finished with Canceled
    6 months ago
    Total: 74s
    #468460
  • Pipeline finished with Success
    6 months ago
    Total: 145s
    #471493
  • Pipeline finished with Success
    6 months ago
    Total: 159s
    #472274
  • Pipeline finished with Failed
    6 months ago
    Total: 356s
    #473106
  • Pipeline finished with Success
    5 months ago
    Total: 255s
    #496961
  • Pipeline finished with Canceled
    5 months ago
    Total: 83s
    #499346
  • Pipeline finished with Success
    5 months ago
    Total: 146s
    #507278
  • Pipeline finished with Failed
    5 months ago
    #512216
  • Pipeline finished with Success
    5 months ago
    Total: 181s
    #513016
  • Pipeline finished with Failed
    4 months ago
    Total: 262s
    #515308
  • Pipeline finished with Failed
    4 months ago
    Total: 507s
    #515354
  • Pipeline finished with Success
    4 months ago
    #525091
  • Pipeline finished with Success
    4 months ago
    #525098
  • Pipeline finished with Success
    4 months ago
    Total: 152s
    #528011
  • Pipeline finished with Success
    3 months ago
    Total: 336s
    #547007
  • Pipeline finished with Success
    3 months ago
    #549322
  • Pipeline finished with Success
    3 months ago
    #550195
  • Pipeline finished with Canceled
    3 months ago
    #555802
  • Pipeline finished with Success
    3 months ago
    Total: 177s
    #555805
  • Pipeline finished with Success
    3 months ago
    #558298
  • Pipeline finished with Failed
    3 months ago
    #559992
  • Pipeline finished with Skipped
    3 months ago
    #560642
  • Pipeline finished with Failed
    3 months ago
    Total: 207s
    #562289
  • Pipeline finished with Success
    2 months ago
    #564738
  • Pipeline finished with Success
    2 months ago
    #564813
  • Pipeline finished with Success
    2 months ago
    Total: 135s
    #566842
  • Pipeline finished with Canceled
    2 months ago
    Total: 66s
    #566904
  • Pipeline finished with Success
    2 months ago
    Total: 201s
    #567700
  • Pipeline finished with Success
    2 months ago
    Total: 155s
    #568101
  • Pipeline finished with Failed
    2 months ago
    Total: 133s
    #569471
  • Pipeline finished with Success
    2 months ago
    Total: 155s
    #570954
  • Pipeline finished with Success
    2 months ago
    Total: 146s
    #571737
  • Pipeline finished with Failed
    about 1 month ago
    Total: 127s
    #597353
  • Pipeline finished with Failed
    about 1 month ago
    Total: 112s
    #597371
  • Pipeline finished with Failed
    about 1 month ago
    Total: 115s
    #597379
  • Pipeline finished with Success
    24 days ago
    Total: 144s
    #605690
  • Pipeline finished with Success
    22 days ago
    Total: 138s
    #607569
  • Pipeline finished with Success
    19 days ago
    Total: 298s
    #610965
  • Pipeline finished with Success
    6 days ago
    Total: 272s
    #623811
Production build 0.71.5 2024