Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-887

UpsertUser send invalid request when no bucket specified

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.1.1
    • None
    • None
    • None
    • 1

    Description

      The current code always appends brackets [] regardless of whether the role you want to add requires them or not. For example using the Role.

       
      user := gocb.User{ Username: username, DisplayName: usernameConfig.DisplayName, Password: password, Roles: []gocb.Role{

      { Name: "ro_admin", }

      , }, }
      produces this error from the couchbase server...

      couchbase_test.go:140: err: {"errors":{"roles":"Cannot assign roles to user because the following roles are unknown, malformed or role parameters are undefined: [ro_admin[]]"}} |

      {"unique_id":"157521e8-de25-4a23-b76b-fb7164a6b006","endpoint":"[http://localhost:8091"}

      |http://localhost:8091%22%7D]

       

      https://github.com/couchbase/gocb/pull/66

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            charles.dixon Charles Dixon
            charles.dixon Charles Dixon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty