File usage tracking authentication issue on multilingual sites

Created on 13 January 2025, 18 days ago

Problem/Motivation

The "file tracking usage" url as displayed on the /admin/config/media/kontainer configuration page does not seem to work on multilingual sites. For example: https://example.com/en/kontainer/api/file-usages.

When performing a GET request with bearer token via postman:

The kontainer_auth authentication provider is only applied to the file tracking endpoint when it exactly matches the /kontainer/api/file-usages route definition. When it's not applied, the kontainer_auth_role is never assigned, and every request will return a 403.

Proposed resolution

Tweak the KontainerAuth::applies() function to support multilingual paths.

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇧🇪Belgium robindh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024