- changed status to resolved
API\GroupPrivileges error
Issue #14
resolved
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)
-
- Log in to comment
Merged in titpetric/bitbucket-api (pull request #2)
fix and close
#14- group privileges grant→ <<cset aaa64b75141d>>