wrong dispatcher filter rules for role my-aem-dispathcer

Description

I created a role my-aem-dispatcher which extends role aem-dispatcher and add a filter rule. by default there are 10 filter rules. but after i change the dispatcher rule to my-aem-dispatcher in the environment definition. I got 12 rules.

Hier are the example code

the generated dispatcher filter rules are:

filter with index 0 and 12 new added. But rule 0 { /type "allow" /url '/.*' } is wrong.

Activity

Show:
Stefan Seifert
January 17, 2020, 4:20 PM

the problem is solved with https://github.com/wcm-io-devops/conga-aem-definitions/commit/339a5d96ea5c2658fe6ab56fff3890ca55d9b077

additionally you should change your custom role to this to make shure the filter rule applies only to publish (unless it should affect author as well):

Guiquan Weng
January 17, 2020, 2:55 PM

I can confirm that the filter definition in environment works as expected. but filter definition within custom role does not work as expected

Stefan Seifert
January 17, 2020, 2:52 PM

oh, sorry, oversaw your last comment - will cross-check your branch

Stefan Seifert
January 17, 2020, 2:51 PM

i tried to reproduce the problem by adding your filter example to the examples projects of the aem definitions:
https://github.com/wcm-io-devops/conga-aem-definitions/commit/4222d69f82e65d35ec3255043f2b122b0d427b22

the problem does not occur, it works as expected.
so i assume the source of the problem within your project - maybe there are multiple filter custom configuration on different levels or in an inherited role?
please cross-check.

Guiquan Weng
January 16, 2020, 2:22 PM

to reproduce the problem i forked the conga-aem-definition repo and extended the example environment :

 

after “mvn clean install -f example“ you can find the generated dispatcher file under example/target/configuration/test/webserver/dispatcher.d/dispatcher_publish.any

 

Fixed

Assignee

Stefan Seifert

Reporter

Guiquan Weng

Labels

None

Components

Fix versions

Priority

Major