简体   繁体   中英

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/

So, I wrote using postman this:

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

User and password are ok. The user has this role. GET works.

But the PUT return 403 (not 401, 403).

RestHeart (v6).

Any tips to solve this?

Solved.

The version 6 changed somethings in security. 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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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