aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gogs.go2
-rw-r--r--routes/api/v1/api.go7
-rw-r--r--templates/.VERSION2
3 files changed, 6 insertions, 5 deletions
diff --git a/gogs.go b/gogs.go
index a3caf185..b87b6c9a 100644
--- a/gogs.go
+++ b/gogs.go
@@ -16,7 +16,7 @@ import (
"github.com/gogs/gogs/pkg/setting"
)
-const APP_VER = "0.11.71.1128"
+const APP_VER = "0.11.72.1201"
func init() {
setting.AppVer = APP_VER
diff --git a/routes/api/v1/api.go b/routes/api/v1/api.go
index f236d9aa..2b4644d4 100644
--- a/routes/api/v1/api.go
+++ b/routes/api/v1/api.go
@@ -63,7 +63,7 @@ func repoAssignment() macaron.Handler {
return
}
- if c.IsLogged && c.User.IsAdmin {
+ if c.IsTokenAuth && c.User.IsAdmin {
c.Repo.AccessMode = models.ACCESS_MODE_OWNER
} else {
mode, err := models.AccessLevel(c.User.ID, repo)
@@ -238,12 +238,13 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/repos", func() {
m.Get("/search", repo.Search)
+
+ m.Get("/:username/:reponame", repoAssignment(), repo.Get)
})
m.Group("/repos", func() {
m.Post("/migrate", bind(form.MigrateRepo{}), repo.Migrate)
- m.Combo("/:username/:reponame", repoAssignment()).Get(repo.Get).
- Delete(repo.Delete)
+ m.Delete("/:username/:reponame", repoAssignment(), repo.Delete)
m.Group("/:username/:reponame", func() {
m.Group("/hooks", func() {
diff --git a/templates/.VERSION b/templates/.VERSION
index 22e76322..2f9cfa54 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.11.71.1128
+0.11.72.1201