Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin user returns "no permission to write" error #528

Open
davidmacp opened this issue Jan 9, 2019 · 0 comments
Open

admin user returns "no permission to write" error #528

davidmacp opened this issue Jan 9, 2019 · 0 comments

Comments

@davidmacp
Copy link
Contributor

When using an admin user with full access, POSTing to a collection with
required fields but sending a document with empty values, the following error is returned:

document
{
"body": "",
"title": ""
}

error

{
    "statusCode": 403,
    "success": false,
    "errors": [
        {
            "field": "body",
            "message": "is a required field which the client has no permission to write to",
            "code": "ERROR_UNAUTHORISED"
        },
        {
            "field": "title",
            "message": "is a required field which the client has no permission to write to",
            "code": "ERROR_UNAUTHORISED"
        }
    ]
}

This appears to be an issue here https://github.com/dadi/api/blob/develop/dadi/lib/model/index.js#L226-L238, where API turns a required
error into an authorisation error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants