You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -161,6 +161,33 @@ Returns an array of created jobs. One for every synchronization.
161
161
162
162
### Team
163
163
164
+
The permissions available for a team are:
165
+
-`canEditTeamPackages`: members of the team can edit and remove packages, assign package permissions (only applies to packages assigned to team).
166
+
-`canAddPackages`: members of the team can add packages to organization; add, edit and remove credentials and mirrored third-party repositories.
167
+
-`canCreateSubrepositories`: members of the team can create subrepositories.
168
+
-`canViewVendorCustomers`: members of the team can view customers, their Composer information, their packages, and their install statistics.
169
+
-`canManageVendorCustomers`: members of the team can create and delete customers, add and remove packages, update their settings, view Composer information and install statistics.
170
+
171
+
```php
172
+
use PrivatePackagist\ApiClient\TeamPermissions;
173
+
174
+
$permissions = new TeamPermissions;
175
+
// Grant all permissions.
176
+
$permissions->canEditTeamPackages = true;
177
+
$permissions->canAddPackages = true;
178
+
$permissions->canCreateSubrepositories = true;
179
+
$permissions->canManageVendorCustomers = true;
180
+
$permissions->canManageVendorCustomers = true;
181
+
```
182
+
183
+
The permissions model can also be constructed via flags:
$team = $client->teams()->create('New Team Name', true, false, false, true, false);
173
-
```
174
-
Creates a team and sets permissions applied to team members. Those permissions are (in order):
175
-
176
-
-`canEditTeamPackages`: members of the team can edit and remove packages, assign package permissions (only applies to packages assigned to team).
177
-
-`canAddPackages`: members of the team can add packages to organization; add, edit and remove credentials and mirrored third-party repositories.
178
-
-`canCreateSubrepositories`: members of the team can create subrepositories.
179
-
-`canViewVendorCustomers`: members of the team can view customers, their Composer information, their packages, and their install statistics.
180
-
-`canManageVendorCustomers`: members of the team can create and delete customers, add and remove packages, update their settings, view Composer information and install statistics.
199
+
use PrivatePackagist\ApiClient\TeamPermissions;
181
200
182
-
Returns the newly-created team.
201
+
$permissions = new TeamPermissions;
202
+
$team = $client->teams()->create('New Team Name', $permissions);
203
+
```
204
+
Creates a team and sets permissions applied to team members. Returns the newly-created team.
0 commit comments