Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-20399

Implement host+uri using compound siteaccess matcher

    Details

    • Story Points:
      2

      Description

      Implement a compound siteaccess matcher. This would make host+uri work again and open to new combinations.

        Activity

        Show
        Jérôme Vieilledent (Inactive) added a comment - https://github.com/ezsystems/ezp-next/pull/223
        Show
        Jérôme Vieilledent (Inactive) added a comment - Implemented in master : https://github.com/ezsystems/ezp-next/commit/82a59b97ba967088d673b0ed731977ea6e2dba23
        Hide
        Joao Pingo (Inactive) added a comment - - edited

        This needs documentation since this is a new feature for ezp5, and configuration is quite different from ezp4.x

        Show
        Joao Pingo (Inactive) added a comment - - edited This needs documentation since this is a new feature for ezp5, and configuration is quite different from ezp4.x
        Hide
        Ricardo Correia (Inactive) added a comment -

        The following document has been updated:
        https://confluence.ez.no/display/EZP/Siteaccess+Matching

        Show
        Ricardo Correia (Inactive) added a comment - The following document has been updated: https://confluence.ez.no/display/EZP/Siteaccess+Matching
        Hide
        Joao Pingo (Inactive) added a comment - - edited

        @Jerome
        I'm having a doubt in the configuration for this settings... following your example all works fine ... but if try to do 2 or more match's i only get the last one

        match:
            Map\URI:
                ezflow_site: ezflow_site
                ezflow_site_admin: ezflow_site_admin
                eng: eng
            #  Map\Host:
            #      admin.ezp5.jp.cleverti.qa.ezpublish.no: ezflow_site_admin
            Compound\LogicalAnd:
                matchers:
                    Map\URI:
                       front: true
                    Map\Host:
                       admin.ezp5.jp.cleverti.qa.ezpublish.no: true
                match: ezflow_site
                matchers:
                    Map\URI:
                       admin: true
                    Map\Host:
                       admin.ezp5.jp.cleverti.qa.ezpublish.no: true
                match: ezflow_site_admin
        
        

        If i try in browser admin.ezp5.jp.cleverti.qa.ezpublish.no/front i'll get module not found
        admin.ezp5.jp.cleverti.qa.ezpublish.no/admin open admin interface correctly

        If i change the order i'll get /front working and /admin will give module not found

        Show
        Joao Pingo (Inactive) added a comment - - edited @Jerome I'm having a doubt in the configuration for this settings... following your example all works fine ... but if try to do 2 or more match's i only get the last one match: Map\URI: ezflow_site: ezflow_site ezflow_site_admin: ezflow_site_admin eng: eng # Map\Host: # admin.ezp5.jp.cleverti.qa.ezpublish.no: ezflow_site_admin Compound\LogicalAnd: matchers: Map\URI: front: true Map\Host: admin.ezp5.jp.cleverti.qa.ezpublish.no: true match: ezflow_site matchers: Map\URI: admin: true Map\Host: admin.ezp5.jp.cleverti.qa.ezpublish.no: true match: ezflow_site_admin If i try in browser admin.ezp5.jp.cleverti.qa.ezpublish.no/front i'll get module not found admin.ezp5.jp.cleverti.qa.ezpublish.no/admin open admin interface correctly If i change the order i'll get /front working and /admin will give module not found
        Hide
        Joao Pingo (Inactive) added a comment - - edited

        Added Complete ezpublish.yml file for my configuration

        Show
        Joao Pingo (Inactive) added a comment - - edited Added Complete ezpublish.yml file for my configuration
        Hide
        Jérôme Vieilledent (Inactive) added a comment - - edited

        Joao Pingo: Your configuration is wrong. You have 2 matchers and match entries in Compound\LogicalAnd. If you want to set up multiple combination, then add several Compound\LogicalAnd sections.

        Show
        Jérôme Vieilledent (Inactive) added a comment - - edited Joao Pingo : Your configuration is wrong. You have 2 matchers and match entries in Compound\LogicalAnd . If you want to set up multiple combination, then add several Compound\LogicalAnd sections.
        Hide
        Joao Pingo (Inactive) added a comment -

        @Jerome
        I've tried with new settings and the same issue is present (only last matcher works)
        Tried this in ezflow and ezdemo
        ezflow yml file -> https://gist.github.com/jpingo/ea130efca925c7c1700a
        ezdemo yml file -> https://gist.github.com/jpingo/f748617f98f241c6ed77

        Show
        Joao Pingo (Inactive) added a comment - @Jerome I've tried with new settings and the same issue is present (only last matcher works) Tried this in ezflow and ezdemo ezflow yml file -> https://gist.github.com/jpingo/ea130efca925c7c1700a ezdemo yml file -> https://gist.github.com/jpingo/f748617f98f241c6ed77
        Hide
        Jérôme Vieilledent (Inactive) added a comment -

        Joao Pingo: OK got it. It's just that you set Compound\LogicalAnd twice, hence the key is overridden and only the last one is kept.
        I'll have to change the behavior a bit to make this work correctly.

        Show
        Jérôme Vieilledent (Inactive) added a comment - Joao Pingo : OK got it. It's just that you set Compound\LogicalAnd twice, hence the key is overridden and only the last one is kept. I'll have to change the behavior a bit to make this work correctly.
        Hide
        Jérôme Vieilledent (Inactive) added a comment -
        Show
        Jérôme Vieilledent (Inactive) added a comment - Pull request to fix the issue : https://github.com/ezsystems/ezpublish-kernel/pull/281
        Hide
        Eduardo Fernandes (Inactive) added a comment - - edited

        It's necessary to update the Siteaccess Matching documentation page to reflect the correct Map\Host way

                match:
                    Map\Host:
                      500.site.com: site
                      alias.site.com: alias
        

        Show
        Eduardo Fernandes (Inactive) added a comment - - edited It's necessary to update the Siteaccess Matching documentation page to reflect the correct Map\Host way match: Map\Host: 500.site.com: site alias.site.com: alias
        Hide
        Jérôme Vieilledent (Inactive) added a comment -

        Of course it is ! It will be done only once the PR is merged.

        Show
        Jérôme Vieilledent (Inactive) added a comment - Of course it is ! It will be done only once the PR is merged.
        Show
        Jérôme Vieilledent (Inactive) added a comment - Fixed in master : https://github.com/ezsystems/ezpublish-kernel/commit/ecc650ca3086f68f0432c2ee6b239d6cb9058c6e
        Hide
        Jérôme Vieilledent (Inactive) added a comment -

        .

        Show
        Jérôme Vieilledent (Inactive) added a comment - .
        Hide
        Joao Pingo (Inactive) added a comment -

        Map\Host settings are not documented yet (on the doc we only have MAP/Uri and the compound matcher examples )

        Show
        Joao Pingo (Inactive) added a comment - Map\Host settings are not documented yet (on the doc we only have MAP/Uri and the compound matcher examples )
        Hide
        Ricardo Correia (Inactive) added a comment -

        The Map\Host configuration has been updated.

        Show
        Ricardo Correia (Inactive) added a comment - The Map\Host configuration has been updated.
        Hide
        Joao Pingo (Inactive) added a comment -

        Tested on master using tc-396
        Tests passed ... approved by QA

        Show
        Joao Pingo (Inactive) added a comment - Tested on master using tc-396 Tests passed ... approved by QA
        Hide
        Jérôme Vieilledent (Inactive) added a comment -

        Documentation on siteaccess matching is now fully up-to-date

        Show
        Jérôme Vieilledent (Inactive) added a comment - Documentation on siteaccess matching is now fully up-to-date

          People

          • Assignee:
            Unassigned
            Reporter:
            Jérôme Vieilledent (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1 day, 4 hours Original Estimate - 1 day, 4 hours
              1d 4h
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 week, 1 day, 1 hour, 20 minutes
              1w 1d 1h 20m

                Agile