Fork repo doesn't check user repository limit #3612

Closed
opened 2025-11-02 05:19:29 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @mrsdizzie on GitHub (Jul 17, 2019).

When repo creation limit is set to 0 a user can still create forks. That is because it calls createRepository directly and not CreateRepository which has a check for limits:

acf6bd42c4/models/repo.go (L2398-L2400)

So

acf6bd42c4/models/repo.go (L1258-L1261)

vs

acf6bd42c4/models/repo.go (L1353-L1357)

Interface would also need to be updated to grey out fork or show warning on "New Repository Fork" dialogue

Originally created by @mrsdizzie on GitHub (Jul 17, 2019). When repo creation limit is set to 0 a user can still create forks. That is because it calls createRepository directly and not CreateRepository which has a check for limits: https://github.com/go-gitea/gitea/blob/acf6bd42c444062bb18352015db05987958c870f/models/repo.go#L2398-L2400 So https://github.com/go-gitea/gitea/blob/acf6bd42c444062bb18352015db05987958c870f/models/repo.go#L1258-L1261 vs https://github.com/go-gitea/gitea/blob/acf6bd42c444062bb18352015db05987958c870f/models/repo.go#L1353-L1357 Interface would also need to be updated to grey out fork or show warning on "New Repository Fork" dialogue
Author
Owner

@mrsdizzie commented on GitHub (Jul 17, 2019):

I guess this is intentional behavior per comment on #4586 so will close this one

@mrsdizzie commented on GitHub (Jul 17, 2019): I guess this is intentional behavior per comment on #4586 so will close this one
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3612