Skip to content

Font Library: fix endpoint permissions #54751

@matiasbenedetto

Description

@matiasbenedetto

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 of wp/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 or uploadedFile.
    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.

Metadata

Metadata

Assignees

Labels

[Feature] TypographyFont and typography-related issues and PRs[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions