如何使用谷歌Apps脚本来识别用户? [英] how to indentify user using google apps script?

查看:161
本文介绍了如何使用谷歌Apps脚本来识别用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一种方法来识别用户。我有一个谷歌的网站,是用户通过其Gmail帐户访问。我的网站被设计为允许用户查看任何数据,但只编辑自己的数据。这工作得很好,我为我的脚本的网站和出版商的所有者,但 Session.getActiveUser()。getUserLoginId()收益其他任何人。结果
请为我提供这个问题的解决方案。任何链接/ code的任何和平?

I need a way to identify users. I have a Google site that is users access via their gmail accounts. My site is designed to allow users to view any data, but edit only their own data. This works fine for me as I'm the owner of the site and publisher of the scripts, but Session.getActiveUser().getUserLoginId() returns null for anyone else.
Please provide me the solution about this problem. Any link / any peace of code?

推荐答案

我想,该脚本部署了执行程序为:组合框设置为。请检查并更改组合框的值到用户访问Web应用程序

I suppose, that the script is deployed with the Execute the app as: combobox set to me. Please check it and change the combobox value to User accessing the web app.

这篇关于如何使用谷歌Apps脚本来识别用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆