[BUG] User inheritance of team permissions #7373

Open
opened 2025-11-02 07:24:16 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @arcanistzed on GitHub (May 23, 2021).

  • Gitea version (or commit ref): 1.14.2 built with GNU Make 4.1, go1.16.4 : bindata, sqlite, sqlite_unlock_notify
  • Git version: 2.25.1
  • Operating system: Ubuntu 20.0.4.2 LTS
  • Database (use [x]):
    • PostgreSQL [x]
    • MySQL
    • MSSQL
    • SQLite
  • Log gist: https://gist.github.com/arcanistzed/2e943022593adf28587dcff410c57e26
    NOTE: The api is working correctly and this problem happens when creating users manually from the UI as well, so not sure how relevant these logs are.

Description

Whenever new users are created (via the API) and added to teams (also with the API), they don't inherit the permissions of that team.
Ex: Team A has read permission to a few repos. When a new user is created and added to Team A (both of these are done with the API), they don't have permission to view that repo (and get a 404). If I want to give them Read permission, I need to give Team A a different permission (e.g. Write permission) and then put it back to Read permission. This has to be done every time there is a new user.

Originally created by @arcanistzed on GitHub (May 23, 2021). - Gitea version (or commit ref): 1.14.2 built with GNU Make 4.1, go1.16.4 : bindata, sqlite, sqlite_unlock_notify - Git version: 2.25.1 - Operating system: Ubuntu 20.0.4.2 LTS - Database (use [x]): - PostgreSQL [x] - MySQL - MSSQL - SQLite - Log gist: https://gist.github.com/arcanistzed/2e943022593adf28587dcff410c57e26 **NOTE:** The api is working correctly and this problem happens when creating users manually from the UI as well, so not sure how relevant these logs are. ## Description Whenever new users are created (via the API) and added to teams (also with the API), they don't inherit the permissions of that team. Ex: `Team A` has read permission to a few repos. When a new user is created and added to `Team A` (both of these are done with the API), they don't have permission to view that repo (and get a 404). If I want to give them Read permission, I need to give `Team A` a different permission (e.g. Write permission) and then put it back to Read permission. This has to be done every time there is a new user.
GiteaMirror added the type/bugmodifies/api labels 2025-11-02 07:24:16 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7373