PHP Bitbucket API

Simple Bitbucket API wrapper for PHP

Users privileges

Use this resource to manage privilege settings for a team account. Team accounts can grant groups account privileges as well as repository access.

Prepare:

$users = new Bitbucket\API\Users();
$users->setCredentials( new Bitbucket\API\Authentication\Basic($bb_user, $bb_pass) );

Get a list of privilege groups on a team account:

$users->privileges()->team($account_name);

Gets the privilege associated with the specified group:

$users->privileges()->group($account_name, 'john', 'testers');

Updates an existing group's privileges for a team account:

$users->privileges()->update($account_name, 'john', 'testers', 'collaborator');

Add a privilege to a group:

$users->privileges()->create($account_name, 'john', 'testers', 'admin');

Deletes a privilege.

$users->privileges()->delete($account_name, 'john', 'testers');