From 9cd8d6c36793f293d8fd6007066fbe495ddda1e0 Mon Sep 17 00:00:00 2001 From: Chris Angelico Date: Mon, 30 Oct 2023 11:21:27 +1100 Subject: [PATCH] Request both read and manage permissions since there's apparently no implicit read --- modules/http/chan_snoozeads.pike | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/http/chan_snoozeads.pike b/modules/http/chan_snoozeads.pike index 41ac8989..830e63fd 100644 --- a/modules/http/chan_snoozeads.pike +++ b/modules/http/chan_snoozeads.pike @@ -23,7 +23,8 @@ continue Concurrent.Future check_stats(object channel) { } mapping(string:mixed)|Concurrent.Future http_request(Protocols.HTTP.Server.Request req) { - if (string scopes = ensure_bcaster_token(req, "channel:manage:ads channel:edit:commercial")) + //NOTE: It seems that channel:manage:ads does not imply channel:read:ads. + if (string scopes = ensure_bcaster_token(req, "channel:read:ads channel:manage:ads channel:edit:commercial")) return render_template("login.md", (["scopes": scopes, "msg": "authentication as the broadcaster"])); if (!req->misc->is_mod) return render_template("login.md", (["msg": "moderator status"])); spawn_task(check_stats(req->misc->channel));