Conflict of paths

Created on 7 August 2024, 4 months ago
Updated 3 September 2024, 3 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

Needs review

Version

2.2

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
    Total: 451s
    #14480
  • Pipeline finished with Failed
    over 1 year ago
    #14556
  • Pipeline finished with Failed
    over 1 year ago
    Total: 308s
    #14558
  • Pipeline finished with Failed
    over 1 year ago
    Total: 228s
    #14559
  • Pipeline finished with Success
    over 1 year ago
    Total: 260s
    #14560
  • Pipeline finished with Success
    over 1 year ago
    Total: 208s
    #14563
  • Pipeline finished with Success
    about 1 year ago
    Total: 261s
    #27721
  • Pipeline finished with Success
    about 1 year ago
    Total: 369s
    #27755
  • Pipeline finished with Skipped
    11 months ago
    #71763
  • Pipeline finished with Success
    11 months ago
    Total: 210s
    #75381
  • Pipeline finished with Success
    9 months ago
    Total: 140s
    #103132
  • Pipeline finished with Success
    8 months ago
    #139256
  • Pipeline finished with Success
    8 months ago
    #139257
  • Pipeline finished with Success
    8 months ago
    #139899
  • Pipeline finished with Success
    8 months ago
    #139909
  • Pipeline finished with Success
    6 months ago
    Total: 187s
    #182728
  • Pipeline finished with Success
    5 months ago
    Total: 209s
    #199389
  • Pipeline finished with Success
    4 months ago
    #238241
  • Issue created by @super_romeo
  • Status changed to Closed: works as designed 4 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 4 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 4 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 Success
    3 months ago
    Total: 133s
    #259677
  • Pipeline finished with Failed
    3 months ago
    #260492
  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    Working on patch now.

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

    Hello @jcontreras,
    please check.

    Tests as a bonus :)

  • Pipeline finished with Failed
    3 months ago
    Total: 494s
    #261200
  • Pipeline finished with Failed
    3 months ago
    Total: 215s
    #261207
  • Pipeline finished with Canceled
    3 months ago
    Total: 127s
    #261236
  • Pipeline finished with Success
    3 months ago
    Total: 137s
    #261238
  • Pipeline finished with Success
    3 months ago
    Total: 139s
    #261369
  • Pipeline finished with Success
    3 months ago
    #261909
  • Pipeline finished with Success
    3 months ago
    #261914
  • πŸ‡ΊπŸ‡Έ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 Failed
    3 months ago
    Total: 530s
    #262778
  • Pipeline finished with Success
    3 months ago
    Total: 197s
    #262867
  • Pipeline finished with Failed
    3 months ago
    Total: 280s
    #263937
  • Pipeline finished with Canceled
    3 months ago
    Total: 102s
    #264898
  • Pipeline finished with Success
    3 months ago
    Total: 243s
    #265273
  • Pipeline finished with Failed
    3 months ago
    Total: 331s
    #265525
  • Pipeline finished with Failed
    3 months ago
    Total: 266s
    #265854
  • Pipeline finished with Success
    3 months ago
    Total: 156s
    #266956
  • Pipeline finished with Failed
    3 months ago
    Total: 191s
    #270005
  • Pipeline finished with Failed
    3 months ago
    Total: 161s
    #271278
  • Pipeline finished with Failed
    3 months ago
    Total: 582s
    #271284
  • Pipeline finished with Success
    3 months ago
    Total: 136s
    #271892
  • Pipeline finished with Success
    3 months ago
    Total: 172s
    #271902
  • Pipeline finished with Success
    3 months ago
    Total: 140s
    #271908
  • Pipeline finished with Success
    3 months ago
    Total: 140s
    #271916
  • Pipeline finished with Success
    3 months ago
    Total: 185s
    #272327
  • πŸ‡·πŸ‡ΈSerbia super_romeo Belgrade

    @jcontreras, you are welcome!

  • Pipeline finished with Success
    3 months ago
    Total: 150s
    #276199
  • Pipeline finished with Success
    3 months ago
    #276520
  • Pipeline finished with Success
    2 months ago
    Total: 231s
    #277057
  • Pipeline finished with Success
    2 months ago
    Total: 204s
    #277839
  • Pipeline finished with Failed
    2 months ago
    Total: 374s
    #280783
  • Pipeline finished with Success
    2 months ago
    Total: 227s
    #281086
  • Pipeline finished with Failed
    2 months ago
    Total: 267s
    #281095
  • Pipeline finished with Success
    2 months ago
    Total: 262s
    #281118
  • Pipeline finished with Success
    2 months ago
    Total: 141s
    #282580
  • Pipeline finished with Failed
    2 months ago
    Total: 195s
    #285458
  • Pipeline finished with Canceled
    2 months ago
    Total: 210s
    #288496
  • Pipeline finished with Success
    about 2 months ago
    Total: 143s
    #291365
  • Pipeline finished with Success
    about 2 months ago
    Total: 372s
    #294935
  • Pipeline finished with Success
    about 2 months ago
    Total: 144s
    #295976
  • Pipeline finished with Skipped
    about 2 months ago
    #295985
  • Pipeline finished with Success
    about 2 months ago
    Total: 119s
    #299001
  • Pipeline finished with Failed
    about 2 months ago
    Total: 338s
    #299501
  • Pipeline finished with Failed
    about 2 months ago
    #299625
  • Pipeline finished with Success
    about 2 months ago
    Total: 160s
    #299689
  • Pipeline finished with Success
    about 2 months ago
    Total: 142s
    #299848
  • Pipeline finished with Success
    about 2 months ago
    Total: 301s
    #301722
  • Pipeline finished with Success
    about 2 months ago
    Total: 15155s
    #301762
  • Pipeline finished with Success
    about 1 month ago
    Total: 264s
    #303880
  • Pipeline finished with Success
    about 1 month ago
    Total: 144s
    #310314
  • Pipeline finished with Success
    about 1 month ago
    Total: 148s
    #310335
  • Pipeline finished with Success
    about 1 month ago
    #310369
  • Pipeline finished with Success
    about 1 month ago
    #310377
  • Pipeline finished with Success
    about 1 month ago
    #310416
  • Pipeline finished with Success
    about 1 month ago
    #310545
  • Pipeline finished with Success
    about 1 month ago
    Total: 447s
    #311043
  • Pipeline finished with Success
    about 1 month ago
    Total: 132s
    #311549
  • Pipeline finished with Success
    about 1 month ago
    Total: 228s
    #315825
  • Pipeline finished with Success
    about 1 month ago
    Total: 192s
    #315839
  • Pipeline finished with Canceled
    about 1 month ago
    Total: 83s
    #316041
  • Pipeline finished with Failed
    about 1 month ago
    Total: 45s
    #316357
  • Pipeline finished with Success
    about 1 month ago
    Total: 195s
    #317054
  • Pipeline finished with Canceled
    29 days ago
    Total: 164s
    #318469
  • Pipeline finished with Failed
    29 days ago
    Total: 654s
    #318480
  • Pipeline finished with Success
    29 days ago
    #318618
  • Pipeline finished with Failed
    27 days ago
    Total: 323s
    #321593
  • Pipeline finished with Failed
    26 days ago
    Total: 213s
    #321846
  • Pipeline finished with Failed
    26 days ago
    #321857
  • Pipeline finished with Success
    26 days ago
    Total: 167s
    #321936
  • Pipeline finished with Success
    25 days ago
    Total: 158s
    #322343
  • Pipeline finished with Success
    24 days ago
    Total: 669s
    #324177
  • Pipeline finished with Failed
    24 days ago
    Total: 158s
    #324193
  • Pipeline finished with Skipped
    23 days ago
    #324379
  • Pipeline finished with Failed
    23 days ago
    Total: 218s
    #324599
  • Pipeline finished with Failed
    23 days ago
    Total: 586s
    #324613
  • Pipeline finished with Failed
    23 days ago
    Total: 633s
    #324626
  • Pipeline finished with Failed
    23 days ago
    Total: 524s
    #325170
  • Pipeline finished with Failed
    20 days ago
    Total: 647s
    #327227
  • Pipeline finished with Success
    18 days ago
    Total: 109s
    #328973
  • Pipeline finished with Success
    10 days ago
    Total: 193s
    #336002
  • Pipeline finished with Failed
    9 days ago
    Total: 173s
    #337632
  • Pipeline finished with Canceled
    8 days ago
    Total: 252s
    #338212
  • Pipeline finished with Skipped
    7 days ago
    #339580
  • Pipeline finished with Success
    4 days ago
    Total: 137s
    #341810
  • Pipeline finished with Skipped
    3 days ago
    #343039
  • Pipeline finished with Success
    2 days ago
    Total: 222s
    #344216
  • Pipeline finished with Success
    1 day ago
    Total: 132s
    #344891
Production build 0.71.5 2024