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: github/orgs_organization_roles.go
+34Lines changed: 34 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,12 @@ type CreateOrUpdateOrgRoleOptions struct {
37
37
BaseRole*string`json:"base_role,omitempty"`
38
38
}
39
39
40
+
// OrganizationFineGrainedPermission represents a fine-grained permission that protects organization resources.
41
+
typeOrganizationFineGrainedPermissionstruct {
42
+
Namestring`json:"name"`
43
+
Descriptionstring`json:"description"`
44
+
}
45
+
40
46
// ListRoles lists the custom roles available in this organization.
41
47
// In order to see custom roles in an organization, the authenticated user must be an organization owner.
42
48
//
@@ -293,3 +299,31 @@ func (s *OrganizationsService) ListUsersAssignedToOrgRole(ctx context.Context, o
293
299
294
300
returnusers, resp, nil
295
301
}
302
+
303
+
// ListFineGrainedPermissions lists the fine-grained permissions that can be used in custom organization roles for an organization.
304
+
//
305
+
// To use this endpoint, the authenticated user must be one of:
306
+
// - An administrator for the organization.
307
+
// - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.
308
+
//
309
+
// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
310
+
//
311
+
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/orgs/organization-roles#list-organization-fine-grained-permissions-for-an-organization
312
+
//
313
+
//meta:operation GET /orgs/{org}/organization-fine-grained-permissions
0 commit comments