go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.32k stars 5.43k forks source link

Repo from deactivated user gives Unauthorized exception #21818

Open TJvV opened 1 year ago

TJvV commented 1 year ago

Description

Also see original thread.

Running a docker version of gitea 1.17.0, (gitea/gitea:1.17.0) image: 71d4bdcd639868a879f7a14bc907215a536225ae13c0edb6432ce4d09915ba5a.

User A created a number of repo's under their own account; gitea/userA/repo1, etc. User B is admin and had access to these repo's, via SSH. After deactivating the account for User A, User B receives "Unauthorized" exceptions when attempting to access the repo's (git fetch/push, etc). In the dashboard, the repo's can still be seen and edited. Adding User B explicitly to gitea/userA/repo1, doesn't help. Re-activating the User A account, also restores the access for User B.

I tried to reproduce this on try.gitea.io, but that won't work as I can't disable (only delete) the account there.

Gitea Version

1.17.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.30.2

Operating System

Linux Debian Bullseye, kernel 5.10.0-13-cloud-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64 GNU/Linux

How are you running Gitea?

Docker version of gitea 1.17.0, (gitea/gitea:1.17.0) image: 71d4bdcd639868a879f7a14bc907215a536225ae13c0edb6432ce4d09915ba5a, running on Linux Debian Bullseye.

Database is also running in Docker, (sameersbn/postgresql:10) image: 27c74465cc2f44beb625f26b122d75ccef8f6f5db8d58aa0236b57c27dcf2685,. psql (PostgreSQL) 10.4 (Ubuntu 10.4-2.pgdg18.04+1)

Database

PostgreSQL

lunny commented 1 year ago

Could you edit repoA's file from the UI? Some git commands may remember the password.