Skip to content

Commit

Permalink
Request both read and manage permissions since there's apparently no …
Browse files Browse the repository at this point in the history
…implicit read
  • Loading branch information
Rosuav committed Oct 30, 2023
1 parent fc600cb commit 9cd8d6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/http/chan_snoozeads.pike
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 9cd8d6c

Please sign in to comment.