首页 > 解决方案 > 您无权执行该操作。请请求此项目的所有者授予您访问权限

问题描述

我的插件具有将所选图表作为图像从侧边栏中导出到谷歌表格的功能。我已使用其动态分配脚本方法 callbackFunction1() 到生成的图像Assign script。当我单击图像时,我的附加组件需要加载到侧边栏中。从发布者帐户单击它时工作正常,但是一旦任何其他最终用户单击图像,红色出现以下错误,

You do not have access to perform that action. Please ask the owner of this item to grant access to you.

请查看随附的屏幕截图以供参考。

回调代码为:

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)
    );
}

这个回调方法是自定义函数。

点击这里查看更多错误信息

标签: google-apps-script

解决方案


推荐阅读