简体   繁体   English

为什么即使 ACL 允许 PUT 方法也无法创建新集合?

[英]Why PUT method not working to create a new collection even if ACL allow it?

I have a role with this permission:我有一个具有此权限的角色:

path-prefix[/mydb] and (method[PUT] or method[POST] or method[GET])

I'm trying to create a collection in this database following this doc: https://restheart.org/docs/mgmt/dbs-collections/我正在尝试在此文档之后在此数据库中创建一个集合: https://restheart.org/docs/mgmt/dbs-collections/

So, I wrote using postman this:所以,我用 postman 写了这个:

method: PUT url: https://myhost.mydomain/mydb/newcollection方法:PUT url: https://myhost.mydomain/mydb/newcollection

User and password are ok.用户名和密码都没问题。 The user has this role.用户具有此角色。 GET works. GET 工作。

But the PUT return 403 (not 401, 403).但是 PUT 返回 403(不是 401、403)。

RestHeart (v6).休息之心 (v6)。

Any tips to solve this?有什么技巧可以解决这个问题吗?

Solved.解决了。

The version 6 changed somethings in security.版本 6 改变了一些安全性。 Now some permissions have to be set explicitly, in this case, to allow management requests:现在必须明确设置一些权限,在这种情况下,以允许管理请求:

"mongo": {
        "allowWriteMode": false,
        "allowManagementRequests": true,
        "allowBulkPatch": false,
        "allowBulkDelete": false
    }

More in: https://restheart.org/docs/upgrade-to-v6/更多内容: https://restheart.org/docs/upgrade-to-v6/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM