Skip /js/ in the Access Gate and set denied-page CSP so Denied UI can render.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Konrad Neitzel
2026-08-28 12:39:47 +02:00
co-authored by Cursor
parent 198ef0e204
commit 984b0c2335
7 changed files with 134 additions and 7 deletions
+8 -1
View File
@@ -71,7 +71,6 @@ func ExampleAccessGate_Wrap() {
inner := http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
_, _ = io.WriteString(w, "ok")
})
// Empty Required Groups: gate is inactive.
h := gonexapp.AccessGate{}.Wrap(inner)
rec := httptest.NewRecorder()
@@ -87,3 +86,11 @@ func ExampleResolveRequiredGroups() {
// []
// 0
}
func ExampleTopMenuAdminRequired() {
fmt.Println(gonexapp.TopMenuAdminRequired("0", gonexapp.DefaultTopMenuAdminRequired))
fmt.Println(gonexapp.TopMenuAdminRequired("maybe", gonexapp.DefaultTopMenuAdminRequired))
// Output:
// 0
// 1
}