add permission check for ``GenerateRepository`` (#15946)
add permission check for ``GenerateRepository`` (#15946)

Signed-off-by: a1012112796 <0a2492404be0c6c42b907cdcd1cb97449035f950@qq.com>

Co-authored-by: techknowlogick <274271a2414b6bd0d2eb0401dd4ff6e85d7016a7@gitea.io>
Co-authored-by: Lunny Xiao <0b0704cdf8f0790c6f1df1f74c38be95a8917ed2@gmail.com>
vdbt/gitea,go-gitea/gitea,vdbt/gitea,go-gitea/gitea,go-gitea/gitea