Get user permissions in organization
GET
/users/{username}/orgs/{org}/permissions
const url = 'https://gitea.com/api/v1/users/example/orgs/example/permissions';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://gitea.com/api/v1/users/example/orgs/example/permissions \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”username
required
string
Username of the user whose permissions are to be obtained
org
required
string
Name of the organization
Responses
Section titled “Responses”OrganizationPermissions
Media typeapplication/json
OrganizationPermissions list different users permissions on an organization
object
can_create_repository
Whether the user can create repositories in the organization
boolean
can_read
Whether the user can read the organization
boolean
can_write
Whether the user can write to the organization
boolean
is_admin
Whether the user is an admin of the organization
boolean
is_owner
Whether the user is an owner of the organization
boolean
Examplegenerated
{ "can_create_repository": true, "can_read": true, "can_write": true, "is_admin": true, "is_owner": true}APIForbiddenError is a forbidden error response
Media typeapplication/json
Headers
Section titled “Headers”message
string
url
string
APINotFound is a not found empty response
Media typeapplication/json