Do not allow organisation owners add themselves as collaborator
We're already checking for repo owners, but we also need to check for organisation owners that try to add themselves as collaborator
Closes #17966
Codecov Report
:exclamation: No coverage uploaded for pull request base (
main@1818149). Click here to learn what that means. The diff coverage is0.00%.
@@ Coverage Diff @@
## main #20043 +/- ##
=======================================
Coverage ? 46.88%
=======================================
Files ? 976
Lines ? 135169
Branches ? 0
=======================================
Hits ? 63373
Misses ? 64031
Partials ? 7765
| Impacted Files | Coverage Δ | |
|---|---|---|
| routers/web/repo/setting.go | 16.76% <0.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 1818149...9821553. Read the comment docs.
Hmm... I am actually wondering if we're doing a silly thing by adding these checks and we're preventing actually wanted behaviour.
For example, with repository transfer and restricted creation I could imagine a situation whereby a repository creating user might want to set up repos to be transferred to other restricted users but add themselves as a collaborator before transferring the repo away.
I'm not sure if this is a good idea and perhaps we should just be warning instead of preventing this behaviour
Ping @lunny
Can you describe more details about #17966 ?
- https://github.com/go-gitea/gitea/issues/17966
well if you move repo you always can add colaborator afterwards ... in that case after move check should pass