mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 20:02:09 +00:00
Merge branch 'access' of github.com:gogits/gogs into access
This commit is contained in:
commit
10e4b5b6c6
14 changed files with 164 additions and 139 deletions
|
@ -164,6 +164,11 @@ func runServ(c *cli.Context) {
|
|||
println("You have no right to write this repository")
|
||||
log.GitLogger.Fatal(2, "User %s has no right to write repository %s", user.Name, repoPath)
|
||||
}
|
||||
|
||||
if repo.IsMirror {
|
||||
println("You can't write to a mirror repository")
|
||||
log.GitLogger.Fatal(2, "User %s tried to write to a mirror repository %s", user.Name, repoPath)
|
||||
}
|
||||
case isRead:
|
||||
if !repo.IsPrivate {
|
||||
break
|
||||
|
|
|
@ -318,7 +318,7 @@ func runWeb(ctx *cli.Context) {
|
|||
m.Get("/template/*", dev.TemplatePreview)
|
||||
}
|
||||
|
||||
reqTrueOwner := middleware.RequireTrueOwner()
|
||||
reqAdmin := middleware.RequireAdmin()
|
||||
|
||||
// Organization.
|
||||
m.Group("/org", func() {
|
||||
|
@ -393,7 +393,7 @@ func runWeb(ctx *cli.Context) {
|
|||
m.Post("/:name", repo.GitHooksEditPost)
|
||||
}, middleware.GitHookService())
|
||||
})
|
||||
}, reqSignIn, middleware.RepoAssignment(true), reqTrueOwner)
|
||||
}, reqSignIn, middleware.RepoAssignment(true), reqAdmin)
|
||||
|
||||
m.Group("/:username/:reponame", func() {
|
||||
m.Get("/action/:action", repo.Action)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue