Skip to content
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

Fix secret loading #3620

Merged
merged 12 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</p>
<br/>
<p align="center">
<a href="https://ci.woodpecker-ci.org/repos/3780" title="Build Status">
<img src="https://ci.woodpecker-ci.org/api/badges/3780/status.svg" alt="Build Status">
<a href="https://ci.woodpecker-ci.org/repos/3780" title="Pipeline Status">
<img src="https://ci.woodpecker-ci.org/api/badges/3780/status.svg" alt="Pipeline Status">
</a>
<a href="https://codecov.io/gh/woodpecker-ci/woodpecker">
<img src="https://codecov.io/gh/woodpecker-ci/woodpecker/branch/main/graph/badge.svg" alt="Code coverage">
Expand Down
9 changes: 7 additions & 2 deletions server/router/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,17 @@ func apiRoutes(e *gin.RouterGroup) {
queue.GET("/norunningpipelines", api.BlockTilQueueHasRunningItem)
}

// global secrets can be read without actual values by any user
readGlobalSecrets := apiBase.Group("/secrets")
{
readGlobalSecrets.Use(session.MustUser())
readGlobalSecrets.GET("", api.GetGlobalSecretList)
readGlobalSecrets.GET("/:secret", api.GetGlobalSecret)
}
secrets := apiBase.Group("/secrets")
{
secrets.Use(session.MustAdmin())
secrets.GET("", api.GetGlobalSecretList)
secrets.POST("", api.PostGlobalSecret)
secrets.GET("/:secret", api.GetGlobalSecret)
secrets.PATCH("/:secret", api.PatchGlobalSecret)
secrets.DELETE("/:secret", api.DeleteGlobalSecret)
}
Expand Down
1 change: 1 addition & 0 deletions web/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ package.json
tsconfig.eslint.json
tsconfig.json
src/assets/locales/
src/assets/dayjsLocales/
components.d.ts
5 changes: 4 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"format": "prettier --write .",
"format:check": "prettier -c .",
"typecheck": "vue-tsc --noEmit",
"test": "echo 'No tests configured' && exit 0"
"test": "vitest"
},
"dependencies": {
"@intlify/unplugin-vue-i18n": "^4.0.0",
Expand Down Expand Up @@ -44,6 +44,7 @@
"@typescript-eslint/parser": "^7.0.0",
"@vitejs/plugin-vue": "^5.0.3",
"@vue/compiler-sfc": "^3.4.15",
"@vue/test-utils": "^2.4.5",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^18.0.0",
Expand All @@ -54,6 +55,7 @@
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-vue": "^9.20.1",
"eslint-plugin-vue-scoped-css": "^2.7.2",
"jsdom": "^24.0.0",
"prettier": "^3.2.4",
"replace-in-file": "^7.1.0",
"tinycolor2": "^1.6.0",
Expand All @@ -64,6 +66,7 @@
"vite-plugin-prismjs": "^0.0.11",
"vite-plugin-windicss": "^1.9.3",
"vite-svg-loader": "^5.1.0",
"vitest": "^1.5.0",
"vue-eslint-parser": "^9.4.0",
"vue-tsc": "^2.0.0",
"windicss": "^3.5.6"
Expand Down
Loading