Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

GET /teams/{id} returns null for organisations #24734

Closed
Lerentis opened this issue May 15, 2023 · 1 comment
Closed

GET /teams/{id} returns null for organisations #24734

Lerentis opened this issue May 15, 2023 · 1 comment
Labels

Comments

@Lerentis
Copy link

Description

Hello there,

just noticed while working with the Go SDK that the API endpoint for GET /teams/{id} always returns null for organisations, even tho the team with the requested ID is part of an org.

Example json response:

{
  "id": 13,
  "name": "test_team",
  "description": "test team of test org",
  "organization": null,
  "includes_all_repositories": true,
  "permission": "admin",
  "units": [
    "repo.releases",
    "repo.projects",
    "repo.packages",
    "repo.pulls",
    "repo.wiki",
    "repo.ext_wiki",
    "repo.code",
    "repo.issues",
    "repo.ext_issues"
  ],
  "units_map": {
    "repo.code": "admin",
    "repo.ext_issues": "admin",
    "repo.ext_wiki": "admin",
    "repo.issues": "admin",
    "repo.packages": "admin",
    "repo.projects": "admin",
    "repo.pulls": "admin",
    "repo.releases": "admin",
    "repo.wiki": "admin"
  },
  "can_create_org_repo": true
}

i can not reproduce this on https://try.gitea.io/ as i do not have the permissions there to create a organisation it seems.

Gitea Version

1.19.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker-compose.yaml:

version: "3"

networks:
  gitea:
    external: false

services:
  server:
    image: gitea/gitea:1.19.3
    container_name: gitea
    environment:
      - USER_UID=1000
      - USER_GID=1000
      - DISABLE_GIT_HOOKS=false
    restart: always
    networks:
      - gitea
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "3000:3000"
      - "222:22"

Database

SQLite

@lunny
Copy link
Member

lunny commented May 15, 2023

This has been resolved by #24694

@lunny lunny closed this as completed May 15, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants