API\GroupPrivileges error

Issue #14 resolved
Tit Petric created an issue

A server side error (400, BAD REQUEST) is triggered when trying to grant a group permissions on a repository, using Bitbucket\API\GroupPrivileges::grant().

The reported error message is: "privilege=admin&format=json is not a valid privilege"

Consulting the documentation, the actual privilege should be sent in the post body without any parameter names or additional parameters.

$ curl --request PUT --user mcatalbas:password https://bitbucket.org/api/1.0/group-privileges/mcatalbas/test/mcatalbas/sys-admins --data read

I tried to add my privileges via the example curl, and it worked without a problem. I tried to track down the issue and managed to fix the tests, request call and the grant parameter, reasonably backwards compatible. I'll submit a pull request shortly.

Comments (1)

  1. Log in to comment