收藏
回答

云平台数据库,无法操作

框架类型 问题类型 终端类型 AppID 基础库版本
小程序 Bug 客户端 wx535f8b3f35c852eb 2.3.2

我是小程序的管理员,执行云开发数据库删除时,会出现错误,权限不够。

Uncaught (in promise) Error: errCode: -1  | errMsg: document.remove:fail Error: cannot remove document with _id good_20181211114253512-331, please make sure that the document exists and you have the corresponding Write permission; at document.remove api; 


1.  _openid是别人的,

2. 权限已设置为:所有用户可读,仅创建者及管理员可写




最后一次编辑于  2018-12-11
回答关注问题邀请回答
收藏

1 个回答

  • 老张
    老张
    2018-12-09

    从字面上理解,和权限无关,这是在update时,你赋值了_id,这个_id的值已经已经存在,重复了非唯一。

    2018-12-09
    有用
    回复 2
    • 佛系青年
      佛系青年
      2018-12-11

      这个是其他的问题,比如我执行删除的时候会出现错误:WACloud.js:1 Uncaught (in promise) Error: errCode: -1  | errMsg: document.remove:fail Error: cannot remove document with _id good_20181211114253512-331, please make sure that the document exists and you have the corresponding Write permission; at document.remove api; 

      2018-12-11
      回复
    • 老张
      老张
      2018-12-11回复佛系青年

      这个就是因为没有权限的原因。

      不是自己创建的doc,只有读没有写权限的,要删除的话,只能通过云端的数据库API。

      另外后台设置collection的权限时,选第一个。

      2018-12-11
      回复
登录 后发表内容