summaryrefslogtreecommitdiffstats
path: root/models/fixtures
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/fixtures
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/fixtures')
-rw-r--r--models/fixtures/org_user.yml13
-rw-r--r--models/fixtures/team.yml20
-rw-r--r--models/fixtures/team_user.yml12
-rw-r--r--models/fixtures/user.yml28
4 files changed, 69 insertions, 4 deletions
diff --git a/models/fixtures/org_user.yml b/models/fixtures/org_user.yml
index 385492dd68..0b6a5e60a7 100644
--- a/models/fixtures/org_user.yml
+++ b/models/fixtures/org_user.yml
@@ -45,3 +45,16 @@
uid: 24
org_id: 25
is_public: true
+
+-
+ id: 9
+ uid: 28
+ org_id: 3
+ is_public: true
+
+-
+ id: 10
+ uid: 28
+ org_id: 6
+ is_public: true
+
diff --git a/models/fixtures/team.yml b/models/fixtures/team.yml
index 4da87b731f..b7e3856172 100644
--- a/models/fixtures/team.yml
+++ b/models/fixtures/team.yml
@@ -96,3 +96,23 @@
authorize: 1 # read
num_repos: 0
num_members: 0
+
+-
+ id: 12
+ org_id: 3
+ lower_name: team12creators
+ name: team12Creators
+ authorize: 3 # admin
+ num_repos: 0
+ num_members: 1
+ can_create_org_repo: true
+
+-
+ id: 13
+ org_id: 6
+ lower_name: team13notcreators
+ name: team13NotCreators
+ authorize: 3 # admin
+ num_repos: 0
+ num_members: 1
+ can_create_org_repo: false
diff --git a/models/fixtures/team_user.yml b/models/fixtures/team_user.yml
index 4fc609791d..d541156fe8 100644
--- a/models/fixtures/team_user.yml
+++ b/models/fixtures/team_user.yml
@@ -69,3 +69,15 @@
org_id: 25
team_id: 10
uid: 24
+
+-
+ id: 13
+ org_id: 3
+ team_id: 12
+ uid: 28
+
+-
+ id: 14
+ org_id: 6
+ team_id: 13
+ uid: 28
diff --git a/models/fixtures/user.yml b/models/fixtures/user.yml
index 5a3b04994c..17294b881f 100644
--- a/models/fixtures/user.yml
+++ b/models/fixtures/user.yml
@@ -50,8 +50,8 @@
avatar: avatar3
avatar_email: user3@example.com
num_repos: 3
- num_members: 2
- num_teams: 3
+ num_members: 3
+ num_teams: 4
-
id: 4
@@ -102,8 +102,8 @@
avatar: avatar6
avatar_email: user6@example.com
num_repos: 0
- num_members: 1
- num_teams: 1
+ num_members: 2
+ num_teams: 2
-
id: 7
@@ -443,3 +443,23 @@
avatar: avatar27
avatar_email: user27@example.com
num_repos: 2
+
+-
+ id: 28
+ lower_name: user28
+ name: user28
+ full_name: "user27"
+ email: user28@example.com
+ keep_email_private: true
+ passwd: 7d93daa0d1e6f2305cc8fa496847d61dc7320bb16262f9c55dd753480207234cdd96a93194e408341971742f4701772a025a # password
+ type: 0 # individual
+ salt: ZogKvWdyEx
+ is_admin: false
+ avatar: avatar28
+ avatar_email: user28@example.com
+ num_repos: 0
+ num_stars: 0
+ num_followers: 0
+ num_following: 0
+ is_active: true
+