summaryrefslogtreecommitdiffstats
path: root/modules/structs/org_team.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/structs/org_team.go')
-rw-r--r--modules/structs/org_team.go21
1 files changed, 15 insertions, 6 deletions
diff --git a/modules/structs/org_team.go b/modules/structs/org_team.go
index 3b2c5e7839..53e3fcf62d 100644
--- a/modules/structs/org_team.go
+++ b/modules/structs/org_team.go
@@ -15,8 +15,11 @@ type Team struct {
// enum: none,read,write,admin,owner
Permission string `json:"permission"`
// example: ["repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.projects","repo.ext_wiki"]
- Units []string `json:"units"`
- CanCreateOrgRepo bool `json:"can_create_org_repo"`
+ // Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions.
+ Units []string `json:"units"`
+ // example: {"repo.code":"read","repo.issues":"write","repo.ext_issues":"none","repo.wiki":"admin","repo.pulls":"owner","repo.releases":"none","repo.projects":"none","repo.ext_wiki":"none"]
+ UnitsMap map[string]string `json:"units_map"`
+ CanCreateOrgRepo bool `json:"can_create_org_repo"`
}
// CreateTeamOption options for creating a team
@@ -28,8 +31,11 @@ type CreateTeamOption struct {
// enum: read,write,admin
Permission string `json:"permission"`
// example: ["repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.projects","repo.ext_wiki"]
- Units []string `json:"units"`
- CanCreateOrgRepo bool `json:"can_create_org_repo"`
+ // Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions.
+ Units []string `json:"units"`
+ // example: {"repo.code":"read","repo.issues":"write","repo.ext_issues":"none","repo.wiki":"admin","repo.pulls":"owner","repo.releases":"none","repo.projects":"none","repo.ext_wiki":"none"]
+ UnitsMap map[string]string `json:"units_map"`
+ CanCreateOrgRepo bool `json:"can_create_org_repo"`
}
// EditTeamOption options for editing a team
@@ -41,6 +47,9 @@ type EditTeamOption struct {
// enum: read,write,admin
Permission string `json:"permission"`
// example: ["repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.projects","repo.ext_wiki"]
- Units []string `json:"units"`
- CanCreateOrgRepo *bool `json:"can_create_org_repo"`
+ // Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions.
+ Units []string `json:"units"`
+ // example: {"repo.code":"read","repo.issues":"write","repo.ext_issues":"none","repo.wiki":"admin","repo.pulls":"owner","repo.releases":"none","repo.projects":"none","repo.ext_wiki":"none"]
+ UnitsMap map[string]string `json:"units_map"`
+ CanCreateOrgRepo *bool `json:"can_create_org_repo"`
}