1
0
Fork 0
forked from forgejo/forgejo

Allow to set organization visibility (public, internal, private) (#1763)

This commit is contained in:
Rémy Boulanouar 2019-02-18 17:00:27 +01:00 committed by Lauris BH
parent ae3a913122
commit 64ce159a6e
27 changed files with 388 additions and 28 deletions

View file

@ -1,4 +1,5 @@
// Copyright 2014 The Gogs Authors. All rights reserved.
// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
@ -6,6 +7,7 @@ package auth
import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/structs"
"github.com/go-macaron/binding"
"gopkg.in/macaron.v1"
@ -20,7 +22,8 @@ import (
// CreateOrgForm form for creating organization
type CreateOrgForm struct {
OrgName string `binding:"Required;AlphaDashDot;MaxSize(35)" locale:"org.org_name_holder"`
OrgName string `binding:"Required;AlphaDashDot;MaxSize(35)" locale:"org.org_name_holder"`
Visibility structs.VisibleType
}
// Validate validates the fields
@ -35,6 +38,7 @@ type UpdateOrgSettingForm struct {
Description string `binding:"MaxSize(255)"`
Website string `binding:"ValidUrl;MaxSize(255)"`
Location string `binding:"MaxSize(50)"`
Visibility structs.VisibleType
MaxRepoCreation int
}