add units for team (#127)

This commit is contained in:
Lunny Xiao 2018-11-07 16:26:53 +08:00 committed by GitHub
parent c740b5dd58
commit 4f96d9ac89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,5 @@
// Copyright 2016 The Gogs Authors. All rights reserved.
// Copyright 2018 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.
@ -11,6 +12,8 @@ type Team struct {
Description string `json:"description"`
// enum: none,read,write,admin,owner
Permission string `json:"permission"`
// enum: repo.code,repo.issues,repo.ext_issues,repo.wiki,repo.pulls,repo.releases,repo.ext_wiki
Units []string `json:"units"`
}
// CreateTeamOption options for creating a team
@ -20,6 +23,8 @@ type CreateTeamOption struct {
Description string `json:"description" binding:"MaxSize(255)"`
// enum: read,write,admin
Permission string `json:"permission"`
// enum: repo.code,repo.issues,repo.ext_issues,repo.wiki,repo.pulls,repo.releases,repo.ext_wiki
Units []string `json:"units"`
}
// EditTeamOption options for editing a team
@ -29,4 +34,6 @@ type EditTeamOption struct {
Description string `json:"description" binding:"MaxSize(255)"`
// enum: read,write,admin
Permission string `json:"permission"`
// enum: repo.code,repo.issues,repo.ext_issues,repo.wiki,repo.pulls,repo.releases,repo.ext_wiki
Units []string `json:"units"`
}