~netlandish/links-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH links] Fixing edge case tracebacks.

Details
Message ID
<20250905194903.1260-1-peter@netlandish.com>
Sender timestamp
1757080141
DKIM signature
missing
Download raw message
Patch: +2 -2
---
 helpers.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/helpers.go b/helpers.go
index e086eb2..3a860bc 100644
--- a/helpers.go
+++ b/helpers.go
@@ -1172,7 +1172,7 @@ func NewRateLimiterConfig(conf *config.Config) (middleware.RateLimiterConfig, er
		}

		if gctx, ok := c.(*server.Context); ok {
			if gctx.User.IsAuthenticated() && gctx.User.IsSuperUser() {
			if gctx.User != nil && gctx.User.IsAuthenticated() && gctx.User.IsSuperUser() {
				return true
			}
		}
@@ -1187,7 +1187,7 @@ func NewRateLimiterConfig(conf *config.Config) (middleware.RateLimiterConfig, er
	)
	rlConfig.IdentifierExtractor = func(c echo.Context) (string, error) {
		if gctx, ok := c.(*server.Context); ok {
			if gctx.User.IsAuthenticated() {
			if gctx.User != nil && gctx.User.IsAuthenticated() {
				return fmt.Sprintf("user:%d", gctx.User.GetID()), nil
			}
		}
-- 
2.49.1
Details
Message ID
<DCL4PZY5T4MM.P9XRC7HTPV4Z@netlandish.com>
In-Reply-To
<20250905194903.1260-1-peter@netlandish.com> (view parent)
Sender timestamp
1757080532
DKIM signature
missing
Download raw message
Applied.

To git@git.code.netlandish.com:~netlandish/links
   5f89d68..271d9a6  master -> master
Reply to thread Export thread (mbox)