Skip to content

Add teams to repo on collaboration page. #8045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Sep 23, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add comment for functions
Signed-off-by: David Svantesson <[email protected]>
  • Loading branch information
davidsvantesson committed Sep 18, 2019
commit 7e450388ee7602c4634023b5299ce1b9a2b0d627
2 changes: 2 additions & 0 deletions routers/repo/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ func DeleteCollaboration(ctx *context.Context) {
})
}

// AddTeamPost response for adding a team to a repository
func AddTeamPost(ctx *context.Context) {
if !ctx.Repo.Owner.RepoAdminChangeTeamAccess && !ctx.Repo.IsOwner() {
ctx.Flash.Error("Changing team access for repository has been restricted to organization owner")
Expand Down Expand Up @@ -620,6 +621,7 @@ func AddTeamPost(ctx *context.Context) {
ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration")
}

// DeleteTeam response for deleting a team from a repository
func DeleteTeam(ctx *context.Context) {
if !ctx.Repo.Owner.RepoAdminChangeTeamAccess && !ctx.Repo.IsOwner() {
ctx.Flash.Error("Changing team access for repository has been restricted to organization owner")
Expand Down