Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

API: team permissions are not properly set #3601

Closed
2 of 7 tasks
nblock opened this issue Mar 1, 2018 · 1 comment
Closed
2 of 7 tasks

API: team permissions are not properly set #3601

nblock opened this issue Mar 1, 2018 · 1 comment
Labels
modifies/api This PR adds API routes or modifies them type/bug

Comments

@nblock
Copy link

nblock commented Mar 1, 2018

  • Gitea version (or commit ref): 1.3.3
  • Git version: 2.11.0
  • Operating system: Debian Stretch
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

We are using the Gitea API to manage teams, team members and team repositories. The workflow is as follows:

  • Create users, organizations and organization repositories
  • Create a new team for an organization with read permission
  • Add existing users to the team
  • Add existing repositories to the team

When we are done, the WebUI displays the team settings as expected and also lists team members as well as the team's repositories. However, if a team member with read permission wants to clone a team repository she gets a 'permission denied' error. When the user tries to view the repo in the WebUI a 404 error is shown.

It seems that the read permissions are not properly propagated internally when the API is used to manage teams.

We found the following workaround:

  • Login as root
  • Open https://gitea.example.com/org/MYORG/teams/MYTEAM/edit
  • Do not modify anything in the forms
  • Hit the Update Settings button

After the workaround team members can access their repository just as the permission system indicates.

We hit #3600 while trying to automate the workaround via the API.

@lafriks lafriks added type/bug modifies/api This PR adds API routes or modifies them labels Mar 1, 2018
@lunny
Copy link
Member

lunny commented Nov 28, 2018

should be fixed by #5314, feel free to reopen it.

@lunny lunny closed this as completed Nov 28, 2018
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
modifies/api This PR adds API routes or modifies them type/bug
Projects
None yet
Development

No branches or pull requests

3 participants