aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/api_repo_test.go
diff options
context:
space:
mode:
authorDavid Svantesson <davidsvantesson@gmail.com>2019-11-20 12:27:49 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2019-11-20 19:27:49 +0800
commit69a255defbf2747b066b2aeee66ba76cdd37104d (patch)
tree8cc6f166c06ff9ac334b3f5f69476fa4394ae6a2 /integrations/api_repo_test.go
parent35c3ea952a6eb558e69de55fc94d301676feb935 (diff)
downloadgitea-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 'integrations/api_repo_test.go')
-rw-r--r--integrations/api_repo_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/integrations/api_repo_test.go b/integrations/api_repo_test.go
index 1682f386d3..e021911afd 100644
--- a/integrations/api_repo_test.go
+++ b/integrations/api_repo_test.go
@@ -347,6 +347,8 @@ func TestAPIOrgRepoCreate(t *testing.T) {
{ctxUserID: 1, orgName: "user3", repoName: "repo-admin", expectedStatus: http.StatusCreated},
{ctxUserID: 2, orgName: "user3", repoName: "repo-own", expectedStatus: http.StatusCreated},
{ctxUserID: 2, orgName: "user6", repoName: "repo-bad-org", expectedStatus: http.StatusForbidden},
+ {ctxUserID: 28, orgName: "user3", repoName: "repo-creator", expectedStatus: http.StatusCreated},
+ {ctxUserID: 28, orgName: "user6", repoName: "repo-not-creator", expectedStatus: http.StatusForbidden},
}
prepareTestEnv(t)