Browse Source
Add teams to repo on collaboration page. (#8045)
Add teams to repo on collaboration page. (#8045)
* Add teams to repo on collaboration page. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add option for repository admins to change teams access to repo. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add comment for functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make RepoAdminChangeTeamAccess default false in xorm and make it default checked in template instead. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make proper language strings and fix error redirection. * Add unit tests for adding and deleting team from repository. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add database migration Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix redirect Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix locale string mismatch. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Move team access mode text logic to template. * Move collaborator access mode text logic to template.release/v1.10
committed by
Lauris BH
30 changed files with 575 additions and 79 deletions
-
17models/error.go
-
11models/fixtures/repository.yml
-
9models/fixtures/team.yml
-
18models/fixtures/user.yml
-
2models/migrations/migrations.go
-
15models/migrations/v97.go
-
8models/org.go
-
4models/org_team.go
-
6models/org_test.go
-
28models/repo_collaboration.go
-
11models/repo_collaboration_test.go
-
13models/user.go
-
5models/user_test.go
-
2models/userlist.go
-
15modules/auth/org.go
-
23modules/structs/org.go
-
9options/locale/locale_en-US.ini
-
3public/css/index.css
-
25public/js/index.js
-
23public/less/_repository.less
-
17routers/api/v1/convert/convert.go
-
17routers/api/v1/org/org.go
-
1routers/org/setting.go
-
83routers/repo/setting.go
-
193routers/repo/settings_test.go
-
4routers/routes/routes.go
-
11templates/org/create.tmpl
-
10templates/org/settings/options.tmpl
-
59templates/repo/settings/collaboration.tmpl
-
12templates/swagger/v1_json.tmpl
@ -0,0 +1,15 @@ |
|||
// Copyright 2019 The Gitea Authors. All rights reserved.
|
|||
// Use of this source code is governed by a MIT-style
|
|||
// license that can be found in the LICENSE file.
|
|||
|
|||
package migrations |
|||
|
|||
import "github.com/go-xorm/xorm" |
|||
|
|||
func addRepoAdminChangeTeamAccessColumnForUser(x *xorm.Engine) error { |
|||
type User struct { |
|||
RepoAdminChangeTeamAccess bool `xorm:"NOT NULL DEFAULT false"` |
|||
} |
|||
|
|||
return x.Sync2(new(User)) |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue