Changeset 0.29.0 (#195)

This commit is contained in:
2026-03-17 16:28:47 +00:00
parent 128cbb8174
commit 5d637d3a90
129 changed files with 9418 additions and 3016 deletions

View File

@@ -70,12 +70,7 @@ func AuthOrSession(cfg *config.Config, stores store.Stores, cache *UserStatusCac
}
// Verify channel exists, is workflow type, and allows anonymous
var chType string
var allowAnon bool
err := database.DB.QueryRowContext(c.Request.Context(),
database.Q(`SELECT type, allow_anonymous FROM channels WHERE id = $1`),
channelID,
).Scan(&chType, &allowAnon)
chType, allowAnon, err := stores.Channels.GetTypeAndAllowAnonymous(c.Request.Context(), channelID)
if err != nil {
c.AbortWithStatusJSON(http.StatusUnauthorized, gin.H{"error": "authentication required"})
return