Font Library: fix endpoint permissions #54751
Labels
[Feature] Typography
Font and typography-related issues and PRs
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
It is necessary to fix the font library endpoints font permissions check.
Check the right folder
We need to check for write permissions in the right folder:
Currently,
wp-content/upload/fonts/
is checked instead ofwp/content/fonts
.Endpoints
GET /fonts/collections/
GET /fonts/collections/<id>/
Should not check for write permissions on disk.
POST /fonts
Should check for write permissions on disk only if any font families received have font faces defined with reference to files:
downloadFromUrl
oruploadedFile
.Should return HTTP error code 403 if there are no permissions.
DELETE /fonts
Should not check write permissions. The font asset will be try to be removed and if it fails it will return error for that particular font face.
The text was updated successfully, but these errors were encountered: