mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
Allow to set organization visibility (public, internal, private) (#1763)
This commit is contained in:
committed by
Lauris BH
parent
ae3a913122
commit
64ce159a6e
@@ -302,6 +302,11 @@ func CreateOrgRepo(ctx *context.APIContext, opt api.CreateRepoOption) {
|
||||
return
|
||||
}
|
||||
|
||||
if !models.HasOrgVisible(org, ctx.User) {
|
||||
ctx.NotFound("HasOrgVisible", nil)
|
||||
return
|
||||
}
|
||||
|
||||
if !ctx.User.IsAdmin {
|
||||
isOwner, err := org.IsOwnedBy(ctx.User.ID)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user