mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 00:45:22 +02:00
Allow to set organization visibility (public, internal, private) (#1763)
This commit is contained in:
parent
ae3a913122
commit
64ce159a6e
27 changed files with 388 additions and 28 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue