融合表权限:如何限制Android应用程序只能添加新条目?
我正在编写一个(Android)应用程序(也可能是一个网站),当用户单击按钮时,它会记录用户的一些数据。我目前正在尝试将这些数据存储在 Google Fusion Table 中。如何配置权限,以便允许应用程序(或网站)向表中添加新条目并查看它,但不能更改现有数据?
我想我可以通过在中间运行一个服务来做到这一点,该服务从手机获取数据,并被授权写入表,但更喜欢一个更简单的解决方案。
I'm writing an (Android) app (probably a website too) that logs some data from the user when they click a button. I'm currently playing with storing this data in a Google Fusion Table. How can I configure the permissions so that the app (or the website) is allowed to add an new entry to the table, and view it, but not change existing data?
I imagine I could do this by running a service in the middle that takes the data from the phone, and is auth'ed to write to the table, but would rather a simpler solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你想要的是不可能的,因为没有“仅插入”权限,如果你是表的编辑者,你实际上可以编辑和插入数据。
也许您可以在以下情况下执行类似的操作使用视图,因此用户可以更新此视图,但不能更新所有其他数据。也许您可以在用户插入数据后立即从可编辑视图中隐藏数据。当然,这必须被视为一种破解或解决方法。
I think what you want is not possible, as there is no "INSERT only" permission, if you are the editor of a table you actually can edit and insert data.
Maybe you can do something similar when using views, so a user can update this view, but not all the other data. Maybe you can hide the data from the editable view right after a user inserted it. Of course, this must be considered as a hack or workaround.