mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-23 12:54:44 +08:00
a0e88dfc2e
* Add teams to repo on collaboration page. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add option for repository admins to change teams access to repo. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add comment for functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make RepoAdminChangeTeamAccess default false in xorm and make it default checked in template instead. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make proper language strings and fix error redirection. * Add unit tests for adding and deleting team from repository. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add database migration Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix redirect Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix locale string mismatch. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Move team access mode text logic to template. * Move collaborator access mode text logic to template.
45 lines
1.8 KiB
Go
45 lines
1.8 KiB
Go
// Copyright 2015 The Gogs Authors. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package structs
|
|
|
|
// Organization represents an organization
|
|
type Organization struct {
|
|
ID int64 `json:"id"`
|
|
UserName string `json:"username"`
|
|
FullName string `json:"full_name"`
|
|
AvatarURL string `json:"avatar_url"`
|
|
Description string `json:"description"`
|
|
Website string `json:"website"`
|
|
Location string `json:"location"`
|
|
Visibility string `json:"visibility"`
|
|
RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"`
|
|
}
|
|
|
|
// CreateOrgOption options for creating an organization
|
|
type CreateOrgOption struct {
|
|
// required: true
|
|
UserName string `json:"username" binding:"Required"`
|
|
FullName string `json:"full_name"`
|
|
Description string `json:"description"`
|
|
Website string `json:"website"`
|
|
Location string `json:"location"`
|
|
// possible values are `public` (default), `limited` or `private`
|
|
// enum: public,limited,private
|
|
Visibility string `json:"visibility" binding:"In(,public,limited,private)"`
|
|
RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"`
|
|
}
|
|
|
|
// EditOrgOption options for editing an organization
|
|
type EditOrgOption struct {
|
|
FullName string `json:"full_name"`
|
|
Description string `json:"description"`
|
|
Website string `json:"website"`
|
|
Location string `json:"location"`
|
|
// possible values are `public`, `limited` or `private`
|
|
// enum: public,limited,private
|
|
Visibility string `json:"visibility" binding:"In(,public,limited,private)"`
|
|
RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"`
|
|
}
|