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.19k stars 5.42k forks source link

[ ⚠️ BUG, not a feature ⚠️ ] UI preventing org repo creation as well if user org limit is reached #30011

Open DrMaxNix opened 6 months ago

DrMaxNix commented 6 months ago

Scenario

Problem

Solutions

Note that I was not able to reproduce the issue on the demo instance, because there is no repo count limit and also it seems like you can't create orgs there..

Screenshots

Trying to create a new repo testrepo45 under testorg organization, note the banner telling me there is a limit: Screenshot from 2024-03-22 23-19-41

Submit button is disabled: Screenshot from 2024-03-22 23-19-29

Repo create works anyway when enabling the submit button by hand: Screenshot from 2024-03-22 23-19-56

Gitea Version

v1.21.9

a1012112796 commented 5 months ago

I has try fix it in https://github.com/go-gitea/gitea/pull/15924, but sadly looks no one think it's a bug :( . maybe need a beter design about how to limit repository number for org. or repo number limit will looks meaningless if all user can create orgs.

DrMaxNix commented 5 months ago

This is definitely a bug! The validation on the frontend does not match the validation in the backend! If the behaviour of the ui is actually wanted (which would be really weird), the backend validation would be wrong, which would not only still be a bug, but also a security problem!!!