My add-on has functionality to Export selected Chart as image from the sidebar into a google sheet. I have dynamically assigned script method callbackFunction1() to generated image using its Assign script
. When i will click on the image, my Add-on need to be loaded in the sidebar. It is working fine when single clicked on it from publisher account but once any other end user, click on the image, following error occurred in Red,
You do not have access to perform that action. Please ask the owner of this item to grant access to you.
Please check attached screenshot for reference.
Callback code is:
function callbackFunction1(){
var key="chart";
var value="bar";
var userProperties = PropertiesService.getDocumentProperties();
userProperties.setProperty(key, value);
SpreadsheetApp.getUi().showSidebar(
HtmlService.createTemplateFromFile('AddonGUI.html').evaluate().setTitle("AddOnTitle")
.setSandboxMode(HtmlService.SandboxMode.IFRAME)
);
}
This callback method is custom function.