Go 1.27 (#755)
Docker / Build and Push (push) Canceled after 0s
github-pages / deploy (push) Canceled after 0s
Test / make test (push) Canceled after 0s
Docker / release (push) Canceled after 0s

* update to go 1.27

* go fix changes
This commit is contained in:
h44z
2026-09-12 17:52:01 +02:00
committed by GitHub
parent 34ee98a51e
commit 38c372e239
46 changed files with 418 additions and 505 deletions
@@ -3,6 +3,7 @@ package handlers
import (
"context"
"net/http"
"slices"
"github.com/h44z/wg-portal/internal/app/api/core/request"
"github.com/h44z/wg-portal/internal/app/api/core/respond"
@@ -137,10 +138,8 @@ func UserHasScopes(session SessionData, scopes ...Scope) bool {
}
// Check if admin scope is required
for _, scope := range scopes {
if scope == ScopeAdmin {
return false
}
if slices.Contains(scopes, ScopeAdmin) {
return false
}
// For all other scopes, a logged-in user is sufficient (for now)