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
Copy file name to clipboardExpand all lines: learn-pr/github/github-introduction-administration/includes/4-how-github-organization-permission-works.md
+3-140Lines changed: 3 additions & 140 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@ After you create a repository with the correct permissions, you can make it a te
26
26
27
27
1. Select **Template repository**.
28
28
29
+
## Ways Users Receive Repository Access
30
+
29
31
### Actions of a User Given a List of Their Repository Permissions
30
32
A user’s effective permissions in a repository are influenced by various factors, including:
31
33
@@ -46,7 +48,7 @@ When granting access to a repository, there are several ways a user can become a
46
48
|**Organization Default Permissions**| If the repository is part of an organization, there may be a default permission level for all organization members (e.g., None, Read). <br> Owners can override these defaults for specific teams or users. |
47
49
|**Outside Collaborator**| A user who is not a member of the organization but has explicit access to a repository. <br> Useful for contractors, freelancers, or open-source contributors needing limited access. |
48
50
49
-
### Audit Access to a Repository
51
+
##Monitoring and Auditing Repository Access
50
52
51
53
Regularly auditing who has access to a repository ensures proper security and compliance. Here are some recommended steps and tools:
52
54
@@ -103,143 +105,4 @@ GitHub offers several permission levels that can be assigned to teams. When you
103
105
104
106
**Tip:** Always follow the Principle of Least Privilege—assign the lowest permission level necessary for each team to perform its tasks effectively. This approach reduces the risk of accidental or unauthorized changes.
105
107
106
-
## Organization permission levels
107
-
GitHub organizations provide a centralized way for teams to collaborate on projects while maintaining controlled access to repositories and sensitive data. Organization permissions determine what members and teams can do within the organization, ensuring that each user has the appropriate level of access.
108
-
109
-
There are multiple levels of permissions at the organizational level:
| Owner | Organization owners can do everything that organization members can do, and they can add or remove other users to and from the organization. This role should be limited to no less than two people in your organization. |
114
-
| Member | Organization members can create and manage organization repositories and teams. |
115
-
| Moderator | Organization moderators can block and unblock nonmember contributors, set interaction limits, and hide comments in public repositories that the organization owns. |
116
-
| Billing manager | Organization billing managers can view and edit billing information. |
117
-
| Security managers | Organization security managers can manage security alerts and settings across your organization. They can also read permissions for all repositories in the organization. |
118
-
| Outside collaborator | Outside collaborators, such as a consultant or temporary employee, can access one or more organization repositories. They aren't explicit members of the organization. |
119
-
120
-
In addition to these levels, you can also set default permissions for all members of your organization:
121
-
122
-
:::image type="content" source="../media/org-base-permissions.png" alt-text="Screenshot of the member privileges screen with the base permissions dropdown displayed.":::
123
-
124
-
For improved management and security, you might also consider giving default read permissions to all members of your organization and adjusting their access to repositories on a case-by-case basis. If you have a relatively small organization with a low number of users, a low number of repositories, or a combination of the two, this level of restriction might be unnecessary. If you trust everyone with pushing changes to any repository, you might prefer to give all members write permissions by default.
125
-
126
-
## Enterprise permission levels
127
-
128
-
Recall from earlier that enterprise accounts are collections of organizations. By extension, each individual user account that is a member of an organization is also a member of the enterprise. You can control various settings related to authentication from this higher level.
129
-
130
-
There are three levels of permission at the enterprise level:
| Owner | Enterprise owners have complete control over the enterprise and can take every action, including: <br> - Managing administrators. <br> - Adding and removing organizations to and from the enterprise. <br> - Managing enterprise settings. <br> - Enforcing policies across organizations. <br> - Managing billing settings. |
135
-
| Member | Enterprise members have the same set of abilities as organization members. |
136
-
| Billing manager | Enterprise billing managers can only view and edit your enterprise's billing information and add or remove other billing managers. |
137
-
| Guest collaborator | Can be granted access to repositories or organizations, but has limited access by default (Enterprise Managed Users only)|
138
-
139
-
In addition to these three levels, you can also set a policy of default repository permissions across all your organizations:
140
-
141
-
:::image type="content" source="../media/enterprise-base-permissions.png" alt-text="Screenshot of the policies screen with the default permissions dropdown displayed.":::
142
-
143
-
For improved management and security, you can give default read permissions to all members of your enterprise and adjust their access to repositories on a case-by-case basis. In a smaller enterprise, such as one with a single, relatively small organization, you might prefer to trust all members with write permissions by default.
144
-
145
-
To further streamline enterprise-scale access control:
146
-
147
-
-**Nested Teams:** Enterprise accounts can use nested team structures to reflect departmental hierarchies. A parent team’s permissions cascade down to child teams, simplifying complex access management.
148
-
-**Automation & Auditing:** You can use GitHub’s API or GitHub Actions to automate team creation and permission assignments, and audit access via organization or enterprise audit logs.
149
-
150
-
## 4.3.4 Difference Between Organization Members and Outside Collaborators
151
-
152
-
Understanding the distinction between an organization member and an outside collaborator is crucial for managing access and permissions effectively within GitHub. Here are the key differences:
153
-
154
-
-**Organization Member:**
155
-
- Included in the organization’s internal directory.
156
-
- Can be assigned to one or more teams with varying levels of repository access.
157
-
- May inherit organization-wide settings, such as SSO requirements or policies.
158
-
159
-
-**Outside Collaborator:**
160
-
- Not an official member of the organization.
161
-
- Has explicit access to specific repositories only.
162
-
- Does not appear in the organization’s internal member list.
163
-
- Lacks broader visibility into private repositories and organization settings.
164
-
165
-
## 4.3.5 Downsides of a User’s Membership in an Instance or Organization
166
-
167
-
When a user becomes a member of a GitHub organization, several implications come into play that affect their access, visibility, and responsibilities within the organization. These consequences are important to understand for effective management and collaboration.
168
-
169
-
-**Access to Private Repositories:** Organization members can view, clone, and contribute to private repos if granted the necessary permissions.
170
-
-**Visibility:** Members appear in the organization’s people directory, which may affect discoverability.
171
-
-**Policy Enforcement:** Security and compliance rules (e.g., SAML SSO, 2FA) apply to all organization members.
172
-
-**Billing Implications:** Each member may count toward your organization’s license or billing plan.
173
-
-**Team Collaboration:** Members can be grouped into teams, streamlining repository permissions and communication.
174
-
175
-
## 4.3.6 Assigning Least Privilege to a User for Repository, Organization or Team
176
-
177
-
Applying the Principle of Least Privilege ensures that users have only the permissions necessary to fulfill their roles:
178
-
179
-
-**Repository Access:**
180
-
- Assign the Read permission to most contributors.
181
-
- Grant Write or Admin only if they need to commit code or manage settings.
182
-
183
-
-**Organization Access:**
184
-
- Start with Member and only elevate to Owner for those who need administrative control.
185
-
- Use Billing Manager for financial responsibilities without granting code access.
186
-
187
-
-**Team Access:**
188
-
- Team Maintainer can manage team membership and settings.
189
-
- Team Member is suitable for contributors who only need to participate in repository and team discussions.
190
-
191
-
## 4.3.7 Benefits and Drawbacks of Creating a New Organization
192
-
193
-
Creating a new organization within GitHub can help you manage projects, teams, and resources more effectively. Here are some benefits and drawbacks to consider:
194
-
### Benefits and drawbacks of creating a new organization
|**Clear Separation:** Keep projects, teams, and billing separate from other organizations. |**Administrative Overhead:** Managing multiple organizations can be more complex. |
199
-
|**Custom Policies:** Apply specific security or compliance policies for different projects. |**Billing Complexity:** Each organization may need separate billing. |
200
-
|**Scalability:** Avoid making a single organization too complex. |**Fragmented Collaboration:** Users might need to switch between organizations. |
201
-
202
-
Consider these points to decide if creating a new organization is the right choice for your needs.
203
-
204
-
## Repository security and management
205
-
206
-
You can oversee the security and management of your repositories in several ways.
207
-
208
-
### Create protection rules
209
-
210
-
To manage changes to content within your repository, you can create [branch protection rules](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule) to enforce certain workflows for one or more branches. Protection rules that can be applied to a branch include:
211
-
212
-
- Require a pull request before merging.
213
-
- Require status checks to pass before merging.
214
-
- Require conversation resolution before merging.
215
-
- Require signed commits.
216
-
- Require linear history.
217
-
- Require merge queue.
218
-
- Require deployments to succeed before merging.
219
-
- Lock the branch by making it read-only.
220
-
- Restrict who can push to matching branches.
221
-
222
-
Additionally, you can set branch rules that apply to everyone, including administrators. For example, you can allow force pushes to matching branches and allow deletions from users who have push access.
223
-
224
-
### Add a CODEOWNERS file
225
-
226
-
By adding a [CODEOWNERS](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-syntax) file to your repository, you can assign team members or entire teams as code owners who are responsible for code in the repository. When someone opens a pull request that modifies code that belongs to a code owner, the code owner is automatically requested as a reviewer.
227
-
228
-
You can create the CODEOWNERS file in either the root of the repository or in the `docs` or `.github` folder.
229
-
230
-
### View traffic by using Insights
231
-
232
-
Anyone who has push access to a repository can [view its traffic](https://docs.github.com/en/repositories/viewing-activity-and-data-for-your-repository/viewing-traffic-to-a-repository). In the traffic graph, they can view full clones (not fetches), visitors from the past 14 days, referring sites, and popular content.
233
-
234
-
To access the traffic graph:
235
-
236
-
1. On GitHub.com, go to the main page of the repository.
237
-
1. Under your repository name, select **Insights**.
238
-
239
-
:::image type="content" source="../media/repository-navigation-insights-tab.png" alt-text="Screenshot showing where to locate the Insights button in GitHub.":::
240
-
241
-
1. On the left, select **Traffic**.
242
-
243
-
:::image type="content" source="../media/traffic-tab.png" alt-text="Screenshot showing the Traffic tab highlighted in GitHub.":::
244
108
245
-
1. Optionally, you can select **Clones** or **Views** to see the traffic graph for clones or views.
0 commit comments