summaryrefslogtreecommitdiffstats
path: root/models/userlist_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 /models/userlist_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 'models/userlist_test.go')
-rw-r--r--models/userlist_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/models/userlist_test.go b/models/userlist_test.go
index ca08cc90ce..c48cfb61c1 100644
--- a/models/userlist_test.go
+++ b/models/userlist_test.go
@@ -17,8 +17,8 @@ func TestUserListIsPublicMember(t *testing.T) {
orgid int64
expected map[int64]bool
}{
- {3, map[int64]bool{2: true, 4: false}},
- {6, map[int64]bool{5: true}},
+ {3, map[int64]bool{2: true, 4: false, 28: true}},
+ {6, map[int64]bool{5: true, 28: true}},
{7, map[int64]bool{5: false}},
{25, map[int64]bool{24: true}},
{22, map[int64]bool{}},
@@ -43,8 +43,8 @@ func TestUserListIsUserOrgOwner(t *testing.T) {
orgid int64
expected map[int64]bool
}{
- {3, map[int64]bool{2: true, 4: false}},
- {6, map[int64]bool{5: true}},
+ {3, map[int64]bool{2: true, 4: false, 28: false}},
+ {6, map[int64]bool{5: true, 28: false}},
{7, map[int64]bool{5: true}},
{25, map[int64]bool{24: false}}, // ErrTeamNotExist
{22, map[int64]bool{}}, // No member
@@ -69,8 +69,8 @@ func TestUserListIsTwoFaEnrolled(t *testing.T) {
orgid int64
expected map[int64]bool
}{
- {3, map[int64]bool{2: false, 4: false}},
- {6, map[int64]bool{5: false}},
+ {3, map[int64]bool{2: false, 4: false, 28: false}},
+ {6, map[int64]bool{5: false, 28: false}},
{7, map[int64]bool{5: false}},
{25, map[int64]bool{24: true}},
{22, map[int64]bool{}},