implement auth and a simple admin-follows whitelist
Some checks failed
Go / build (push) Has been cancelled

This commit is contained in:
2025-09-07 19:08:29 +01:00
parent f5a8c094e4
commit 5edb7a3b09
27 changed files with 458 additions and 117 deletions

View File

@@ -163,7 +163,7 @@ func TestQueryForIds(t *testing.T) {
for _, ev := range events {
if ev.Tags != nil && ev.Tags.Len() > 0 {
// Find a tag with at least 2 elements and first element of length 1
for _, tag := range ev.Tags.ToSliceOfTags() {
for _, tag := range *ev.Tags {
if tag.Len() >= 2 && len(tag.Key()) == 1 {
testEvent = ev
break
@@ -178,9 +178,9 @@ func TestQueryForIds(t *testing.T) {
if testEvent != nil {
// Get the first tag with at least 2 elements and first element of length 1
var testTag *tag.T
for _, tag := range testEvent.Tags.ToSliceOfTags() {
for _, tag := range *testEvent.Tags {
if tag.Len() >= 2 && len(tag.Key()) == 1 {
testTag = &tag
testTag = tag
break
}
}
@@ -212,7 +212,7 @@ func TestQueryForIds(t *testing.T) {
// Check if the event has the tag we're looking for
var hasTag bool
for _, tag := range ev.Tags.ToSliceOfTags() {
for _, tag := range *ev.Tags {
if tag.Len() >= 2 && len(tag.Key()) == 1 {
if utils.FastEqual(
tag.Key(), testTag.Key(),
@@ -316,7 +316,7 @@ func TestQueryForIds(t *testing.T) {
// Check if the event has the tag we're looking for
var hasTag bool
for _, tag := range ev.Tags.ToSliceOfTags() {
for _, tag := range *ev.Tags {
if tag.Len() >= 2 && len(tag.Key()) == 1 {
if utils.FastEqual(
tag.Key(), testTag.Key(),
@@ -384,7 +384,7 @@ func TestQueryForIds(t *testing.T) {
// Check if the event has the tag we're looking for
var hasTag bool
for _, tag := range ev.Tags.ToSliceOfTags() {
for _, tag := range *ev.Tags {
if tag.Len() >= 2 && len(tag.Key()) == 1 {
if utils.FastEqual(
tag.Key(), testTag.Key(),
@@ -445,7 +445,7 @@ func TestQueryForIds(t *testing.T) {
// Check if the event has the tag we're looking for
var hasTag bool
for _, tag := range ev.Tags.ToSliceOfTags() {
for _, tag := range *ev.Tags {
if tag.Len() >= 2 && len(tag.Key()) == 1 {
if utils.FastEqual(
tag.Key(), testTag.Key(),