Browse Source

Some PR implements

pull/2423/head
ExMex 9 years ago
parent
commit
5e1f9069bb
  1. 1
      modules/ssh/ssh.go
  2. 2
      routers/repo/repo.go
  3. 2
      templates/repo/diff.tmpl

1
modules/ssh/ssh.go

@ -91,6 +91,7 @@ func handleServerConn(keyID string, chans <-chan ssh.NewChannel) {
return return
} }
req.Reply(true, nil);
go io.Copy(input, ch) go io.Copy(input, ch)
io.Copy(ch, stdout) io.Copy(ch, stdout)
io.Copy(ch.Stderr(), stderr) io.Copy(ch.Stderr(), stderr)

2
routers/repo/repo.go

@ -57,7 +57,7 @@ func checkContextUser(ctx *middleware.Context, uid int64) *models.User {
} }
// Check ownership of organization. // Check ownership of organization.
if !org.IsOrganization() || !org.IsOwnedBy(ctx.User.Id) { if !org.IsOrganization() || !(ctx.User.IsAdmin || org.IsOwnedBy(ctx.User.Id) {
ctx.Error(403) ctx.Error(403)
return nil return nil
} }

2
templates/repo/diff.tmpl

@ -1,7 +1,7 @@
{{template "base/head" .}} {{template "base/head" .}}
<div class="repository diff"> <div class="repository diff">
{{template "repo/header" .}} {{template "repo/header" .}}
<div class="ui container"> <div class="{{if $.IsSplitStyle}}ui{{else}}ui container{{end}}">
{{if .IsDiffCompare }} {{if .IsDiffCompare }}
{{template "repo/commits_table" .}} {{template "repo/commits_table" .}}
{{else}} {{else}}

Loading…
Cancel
Save