When you install an add-on, JIRA will automatically grant the add-on the correct permissions for its scope through the atlassian-addons-project-access role. It will also check the permissions of existing add-ons across all JIRA and JIRA Service Desk projects and grant them the correct permissions as well.
If you're experiencing issues attaching or removing files or folders to Jira issues using Team Files, please verify if you have the correct Issues Permissions Schema for the Project Role: atlassian-addons-project-access.
<your-jira-instance-url>/jira/settings/issues/permission-schemes
For more details on this Atlassian Jira configuration click here