Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit157d289

Browse files
committed
Sync with upstream repository
1 parent20bee00 commit157d289

File tree

6 files changed

+287
-47
lines changed

6 files changed

+287
-47
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
kind:change
3+
title:API enhancements for working with organization permissions
4+
created_at:2015-06-24
5+
author_name:jakeboxer
6+
---
7+
8+
We're introducing several enhancements to allow API developers to take advantage of the[improved organization permissions][dotcom-blog-post] that we are rolling out. Learn about these enhancements and how you can try them out below.
9+
10+
Since we're rolling out the[improved organization permissions][dotcom-blog-post] improvements slowly, these enhancements will only apply to certain organizations at first. Most of these enhancements will degrade gracefully (returning an empty array or something similar) if used on an organization that doesn't support improved organization permissions yet. Check the documentation for your specific API to see if errors are possible.
11+
12+
##API enhancements
13+
14+
###Team permissions
15+
16+
In our improved permissions system, a team no longer has a single permission that applies to all of its repositories. Instead, each repository is added to a team with its own permission. For example, an organization could use a single team to grant pull access to one repository, push access to a second, and admin access to a third.
17+
18+
The team APIs now support this more granular notion of permissions:
19+
20+
- The[Add team repository][add-team-repo] API accepts a`permission` parameter, so that you can specify whether a team should grant`pull`,`push`, or`admin` access on a given repository.
21+
- In the[List team repositories][list-team-repos] and[Check if a team manages a repository][get-team-repo] API, the response includes a`permissions` attribute, indicating whether the team grants`pull`,`push`, or`admin` access on each repository.
22+
- The`permission` parameter in the[Create team][create-team] and[Edit team][edit-team] APIs is deprecated. Since teams can grant a different permission on each repository, this parameter no longer dictates what permission a team grants on all of its repositories. Instead, it dictates the default permission that the[Add team repository][add-team-repo] API will use for requests where no`permission` parameter is specified.
23+
24+
###Team privacy
25+
26+
We now allow you to modify the privacy level of your teams. A "secret" team can only be seen by organization owners and people who are members of that team (which is how all teams have worked historically), while a "closed" team is visible to every member of the organization (which makes it easier to use[@mentions][team-mentions] throughout your organization).
27+
28+
The team APIs now support this new team privacy concept:
29+
30+
- The[Create team][create-team] and[Edit team][edit-team] APIs accept a`privacy` parameter, so that you can specify whether a team should be`secret` or`closed`.
31+
- All team resources in the API now include a`privacy` attribute, indicating whether the team is`secret` or`closed`.
32+
33+
###Team maintainers
34+
35+
We've added the ability for you to delegate team maintenance to non-owners, reducing the workload for your organization's owners. You can now promote a non-owner member of a team to be a "maintainer" of that team. A maintainer can add and remove team members and change the team's title and description.
36+
37+
The team membership APIs now support this new team maintainer concept:
38+
39+
- The[Add team membership][add-team-membership] API accepts a`role` parameter, so that you can specify whether a given team member should be a`maintainer` or a regular`member`.
40+
- The[List team members][list-team-members] API accepts an optional`role` parameter, allowing you to fetch only`maintainer`s or only regular`member`s.
41+
- In the[Get team membership][get-team-membership] and[Add team membership][add-team-membership] APIs, the response includes a`role` attribute, indicating whether a user is a`maintainer` or a regular`member` of the team.
42+
43+
For more information on our improved team permissions, check out our[documentation][understanding-team-permissions].
44+
45+
###Filtering organization members by role
46+
47+
The organization[Members list][org-members-list] API now accepts a`role` parameter, so that you can request to see only the owners (or non-owners) of your organization.
48+
49+
###Repository collaborators
50+
51+
We now allow you to add collaborators directly to organization-owned repositories, just like we always have for user-owned repositories.
52+
53+
The collaborator APIs now support organization-owned repositories:
54+
55+
- The[Add user as a collaborator][add-collab] API works for organization-owned repositories. We've also added a`permission` parameter to it (currently valid for organization-owned repositories only), so that you can specify what level of access the collaborator should have on the repository.
56+
- In the[List collaborators][list-collabs] API, the response includes a`permissions` attribute describing the permissions that each collaborator has on your organization's repositories.
57+
58+
##Preview period
59+
60+
Starting today, these API enhancements are available for developers to preview. At the end of the preview period, these enhancements will become official components of the GitHub API.
61+
62+
While these enhancements are in their preview period, you'll need to provide the following[custom media type][custom-media-types] in the`Accept` header:
63+
64+
application/vnd.github.ironman-preview+json
65+
66+
During the preview period, we may change aspects of these enhancements. If we do, we will announce the changes on the developer blog, but we will not provide any advance notice.
67+
68+
##Send us your feedback
69+
70+
We would love to hear your thoughts on these enhancements. If you have any questions or feedback, please[get in touch with us][contact]!
71+
72+
[dotcom-blog-post]:https://github.com/blog/2020-improved-organization-permissions
73+
[understanding-team-permissions]:https://help.github.com/articles/improved-organization-permissions/#understanding-team-permissions
74+
[create-team]:/v3/orgs/teams/#create-team
75+
[edit-team]:/v3/orgs/teams/#edit-team
76+
[list-team-members]:/v3/orgs/teams/#list-team-members
77+
[get-team-membership]:/v3/orgs/teams/#get-team-membership
78+
[add-team-membership]:/v3/orgs/teams/#add-team-membership
79+
[list-team-repos]:/v3/orgs/teams/#list-team-repos
80+
[get-team-repo]:/v3/orgs/teams/#get-team-repo
81+
[add-team-repo]:/v3/orgs/teams/#add-team-repo
82+
[org-members-list]:/v3/orgs/members/#members-list
83+
[org-public-members-list]:/v3/orgs/members/#public-members-list
84+
[list-collabs]:/v3/repos/collaborators/#list
85+
[add-collab]:/v3/repos/collaborators/#add-collaborator
86+
[contact]:https://github.com/contact?form[subject]=Organization+Permissions+API
87+
[team-mentions]:https://github.com/blog/1121-introducing-team-mentions
88+
[custom-media-types]:/v3/media/

‎content/v3/orgs/members.md‎

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,22 @@ be returned.
2020

2121
Name | Type | Description
2222
--------|---------|--------------
23-
`filter`|`string` | Filter members returned in the list. Can be one of:<br/>*`2fa_disabled`: Members without[two-factor authentication][2fa-blog] enabled. Available for organizationadmins.<br/>*`all`: All members the authenticated user can see.<br/><br/>Default:`all`
24-
`role` |`string` | Filter members returned by their role.If specified, must be set to`admin`, which will only return users with admin permissions ontheorg.
23+
`filter`|`string` | Filter members returned in the list. Can be one of:<br/>*`2fa_disabled`: Members without[two-factor authentication][2fa-blog] enabled. Available for organizationowners.<br/>*`all`: All members the authenticated user can see.<br/><br/>Default:`all`
24+
`role` |`string` | Filter members returned by their role.Can be one of:<br/>*`all`: All members of the organization, regardless of role.<br/>*`admin`: Organization owners.<br/>*`member`: Non-owner organization members.**This option requires a custom media type to be specified. Please see more inthealert below.**<br/><br/>Default:`all`
2525

2626
[2fa-blog]:https://github.com/blog/1614-two-factor-authentication
2727

28+
<divclass="alert">
29+
<p>
30+
We're currently offering a preview period allowing applications to opt in to the Organization Permissions API. Please see the <a href="/changes/2015-06-24-api-enhancements-for-working-with-organization-permissions/">blog post</a> for full details.
31+
</p>
32+
33+
<p>
34+
To access the API during the preview period, you must provide a custom <a href="/v3/media">media type</a> in the <code>Accept</code> header:
35+
<pre>application/vnd.github.ironman-preview+json</pre>
36+
</p>
37+
</div>
38+
2839
###Response
2940

3041
<%= headers 200,:pagination => default_pagination_rels %>
@@ -58,8 +69,9 @@ Check if a user is, publicly or privately, a member of the organization.
5869

5970
##Add a member
6071

61-
To add someone as a member to an org, you must add them to a
62-
[team](/v3/orgs/teams/#add-team-member).
72+
To add someone as a member to an organization, you must
73+
[invite them to the organization](/v3/orgs/members/#add-or-update-organization-membership)
74+
or[invite them to a team](/v3/orgs/teams/#add-team-membership).
6375

6476
##Remove a member
6577

@@ -119,7 +131,7 @@ The user can publicize their own membership.
119131

120132
##Get organization membership
121133

122-
In order to get a user's membership with an organization, the authenticated user must be an organizationadmin.
134+
In order to get a user's membership with an organization, the authenticated user must be an organizationowner.
123135

124136
GET /orgs/:org/memberships/:username
125137

@@ -140,15 +152,15 @@ In order to get a user's membership with an organization, the authenticated user
140152

141153
##Add or update organization membership
142154

143-
In order to create or update a user's membership with an organization, the authenticated user must be an organizationadmin.
155+
In order to create or update a user's membership with an organization, the authenticated user must be an organizationowner.
144156

145157
PUT /orgs/:org/memberships/:username
146158

147159
###Parameters
148160

149161
Name | Type | Description
150162
------|--------|--------------
151-
`role`|`string`|**Required**. The role to give the user in the organization. Can be one of:<br/> *`admin` - The user will become anadministrator of the organization.<br/> *`member` - The user will become a non-admin member of the organization. Use this only to demote an existingadmin to a non-admin.
163+
`role`|`string`|**Required**. The role to give the user in the organization. Can be one of:<br/> *`admin` - The user will become anowner of the organization.<br/> *`member` - The user will become a non-owner member of the organization. Use this only to demote an existingowner to a non-owner.
152164

153165
###Response if user was previously unaffiliated with organization
154166

@@ -162,7 +174,7 @@ Name | Type | Description
162174

163175
##Remove organization membership
164176

165-
In order to remove a user's membership with an organization, the authenticated user must be an organizationadmin.
177+
In order to remove a user's membership with an organization, the authenticated user must be an organizationowner.
166178

167179
DELETE /orgs/:org/memberships/:username
168180

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp