diff options
author | David Svantesson <davidsvantesson@gmail.com> | 2019-11-20 12:27:49 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-11-20 19:27:49 +0800 |
commit | 69a255defbf2747b066b2aeee66ba76cdd37104d (patch) | |
tree | 8cc6f166c06ff9ac334b3f5f69476fa4394ae6a2 /modules/structs/org_team.go | |
parent | 35c3ea952a6eb558e69de55fc94d301676feb935 (diff) | |
download | gitea-69a255defbf2747b066b2aeee66ba76cdd37104d.tar.gz gitea-69a255defbf2747b066b2aeee66ba76cdd37104d.zip |
Team permission to create repository in organization (#8312)
* Add team permission setting to allow creating repo in organization.
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Add test case for creating repo when have team creation access.
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* build error: should omit comparison to bool constant
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Add comment on exported functions
* Fix fixture consistency, fix existing unit tests
* Fix boolean comparison in xorm query.
* addCollaborator and changeCollaborationAccessMode separate steps
More clear to use different if-cases.
* Create and commit xorm session
* fix
* Add information of create repo permission in team sidebar
* Add migration step
* Clarify that repository creator will be administrator.
* Fix some things after merge
* Fix language text that use html
* migrations file
* Create repository permission -> Create repositories
* fix merge
* fix review comments
Diffstat (limited to 'modules/structs/org_team.go')
-rw-r--r-- | modules/structs/org_team.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/structs/org_team.go b/modules/structs/org_team.go index 5053468b4a..16f83823d6 100644 --- a/modules/structs/org_team.go +++ b/modules/structs/org_team.go @@ -15,7 +15,8 @@ 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.ext_wiki"] - Units []string `json:"units"` + Units []string `json:"units"` + CanCreateOrgRepo bool `json:"can_create_org_repo"` } // CreateTeamOption options for creating a team @@ -27,7 +28,8 @@ 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.ext_wiki"] - Units []string `json:"units"` + Units []string `json:"units"` + CanCreateOrgRepo bool `json:"can_create_org_repo"` } // EditTeamOption options for editing a team @@ -39,5 +41,6 @@ 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.ext_wiki"] - Units []string `json:"units"` + Units []string `json:"units"` + CanCreateOrgRepo bool `json:"can_create_org_repo"` } |