Plone add-on: configure.zcml in browser subdirectory - extra include for permission.zcml necessary

I tried to use a custom permission for a browser:page and a browser:viewlet entry, which I defined in the configure.zcml of the browser subdirectory. This permissions are defined within a permission.zcml, which was included in the configure.zcml inside the root of the add-ons src directory:

I added also an entry to the rolemap.xml file in the profile/default directory.

But the custom permission was never recognized from the configure.zcml script inside the browser subdirectory and the Plone startup ended with a traceback.

Once I added an additional entry to the permission.zcml to the configure.zcml inside the browser subdirectory the custom permission was recognized:

I wonder if this is the correct way to fix my issue.

Thanks for any hints in advance
Andreas

Which traceback?

I have my doubts. In general, a single processing of a ZCML directive is sufficient to make it effective. If I understand your description correctly, then you have included your permissions.zcml a second time -- and this has changed something; this should not be the case.

Yes, that's correct. I included the permission.zcml a second time within
the configure.zcml of the browser directory.

Plone Foundation Code of Conduct