mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 10:43:09 +00:00
moved 0.5 out of feature flag, removed deprecated 0.4 code and features
This commit is contained in:
29
web/pages.go
29
web/pages.go
@@ -30,7 +30,7 @@ func ShowIndex(c *gin.Context) {
|
||||
}
|
||||
|
||||
// filter to only show the currently active ones
|
||||
activeRepos, err := store.GetRepoListOf(c,repos)
|
||||
activeRepos, err := store.GetRepoListOf(c, repos)
|
||||
if err != nil {
|
||||
c.String(400, err.Error())
|
||||
return
|
||||
@@ -83,26 +83,6 @@ func ShowUser(c *gin.Context) {
|
||||
})
|
||||
}
|
||||
|
||||
func ShowUsers(c *gin.Context) {
|
||||
user := session.User(c)
|
||||
if !user.Admin {
|
||||
c.AbortWithStatus(http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
users, _ := store.GetUserList(c)
|
||||
|
||||
token, _ := token.New(
|
||||
token.CsrfToken,
|
||||
user.Login,
|
||||
).Sign(user.Hash)
|
||||
|
||||
c.HTML(200, "users.html", gin.H{
|
||||
"User": user,
|
||||
"Users": users,
|
||||
"Csrf": token,
|
||||
})
|
||||
}
|
||||
|
||||
func ShowRepo(c *gin.Context) {
|
||||
user := session.User(c)
|
||||
repo := session.Repo(c)
|
||||
@@ -227,10 +207,3 @@ func ShowBuild(c *gin.Context) {
|
||||
"Csrf": csrf,
|
||||
})
|
||||
}
|
||||
|
||||
func ShowNodes(c *gin.Context) {
|
||||
user := session.User(c)
|
||||
nodes, _ := store.GetNodeList(c)
|
||||
token, _ := token.New(token.CsrfToken, user.Login).Sign(user.Hash)
|
||||
c.HTML(http.StatusOK, "nodes.html", gin.H{"User": user, "Nodes": nodes, "Csrf": token})
|
||||
}
|
||||
|
Reference in New Issue
Block a user