Forge macros. How to check if user can edit page?

Hi Team,

I’m developing confluence macro on Forge. I would like to disable some functionality if user have no permission to edit current page. How can I check if user can edit page (for example via rest api)?



I would say the Check content permissions API ? With the operation parameter set to read.