From d4d03006aa3dd58568b1489a20971b6741787b25 Mon Sep 17 00:00:00 2001 From: Roy Zuo <26777013+royjor2016@users.noreply.github.com> Date: Wed, 29 Apr 2026 19:06:41 +0200 Subject: [PATCH 1/4] Update app.py Change requirement and message, so that users can apply for waiver of editcount, and are hence not incentivised to boost their editcount needlessly. https://commons.wikimedia.org/wiki/Commons:Village_pump/Proposals#c-RoyZuo-20260406210300-Video2commons_requirement_waiver --- video2commons/frontend/app.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/video2commons/frontend/app.py b/video2commons/frontend/app.py index 6e7d398..38a73fc 100644 --- a/video2commons/frontend/app.py +++ b/video2commons/frontend/app.py @@ -240,14 +240,16 @@ def logincallback(): is_contributor = identify["editcount"] >= 50 is_maintainer = is_sudoer(identify["username"]) is_autoconfirmed = "autoconfirmed" in identify["rights"] + is_confirmed = "confirmed" in identify["rights"] - # Only allow autoconfirmed users either with at least 50 edits or - # maintainer status to use this tool. - if not (is_autoconfirmed and (is_contributor or is_maintainer)): + # Only allow autoconfirmed users either with at least 50 edits, or + # confirmed users, or maintainer status to use this tool. + if not ((is_autoconfirmed and (is_contributor or is_maintainer)) or is_confirmed): return render_template( "error.min.html", - message="You must be an autoconfirmed Commons user " - "with at least 50 edits to use this tool.", + message="You do not meet the requirements. To use this tool, " + "please apply to be a confirmed user at https://commons.wikimedia.org/wiki/Commons:Requests_for_rights#Confirmed , " + "explaining why you need to use video2commons.", loggedin=True, username=identify["username"], ) From ccbe8425f888a1cf10151558ed934d021b84ece2 Mon Sep 17 00:00:00 2001 From: Roy Zuo <26777013+royjor2016@users.noreply.github.com> Date: Wed, 29 Apr 2026 19:22:05 +0200 Subject: [PATCH 2/4] Update app.py no raw url? --- video2commons/frontend/app.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/video2commons/frontend/app.py b/video2commons/frontend/app.py index 38a73fc..842a75b 100644 --- a/video2commons/frontend/app.py +++ b/video2commons/frontend/app.py @@ -247,9 +247,11 @@ def logincallback(): if not ((is_autoconfirmed and (is_contributor or is_maintainer)) or is_confirmed): return render_template( "error.min.html", - message="You do not meet the requirements. To use this tool, " - "please apply to be a confirmed user at https://commons.wikimedia.org/wiki/Commons:Requests_for_rights#Confirmed , " - "explaining why you need to use video2commons.", + message=("You must be an autoconfirmed Commons user with at least 50 edits to use this tool. " + "You do not meet the requirements. To use this tool, please " + '' + "apply to be a confirmed user, clearly explaining why you need to use video2commons." + ), loggedin=True, username=identify["username"], ) From 32ae1e2094f9d30cce01eda6285108e00fef5aae Mon Sep 17 00:00:00 2001 From: Roy Zuo <26777013+royjor2016@users.noreply.github.com> Date: Wed, 6 May 2026 19:13:33 +0200 Subject: [PATCH 3/4] Update app.py hide requirement to avoid incentivising useless edit --- video2commons/frontend/app.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/video2commons/frontend/app.py b/video2commons/frontend/app.py index 842a75b..c2ebfce 100644 --- a/video2commons/frontend/app.py +++ b/video2commons/frontend/app.py @@ -247,8 +247,7 @@ def logincallback(): if not ((is_autoconfirmed and (is_contributor or is_maintainer)) or is_confirmed): return render_template( "error.min.html", - message=("You must be an autoconfirmed Commons user with at least 50 edits to use this tool. " - "You do not meet the requirements. To use this tool, please " + message = ("You do not meet the requirements. To use this tool, please " '' "apply to be a confirmed user, clearly explaining why you need to use video2commons." ), From 5fbed1b16ca92edd42b473d8accee2d65afc97b2 Mon Sep 17 00:00:00 2001 From: Jamie Kuppens Date: Fri, 15 May 2026 10:11:01 -0700 Subject: [PATCH 4/4] Use html_message to render link, and check group --- video2commons/frontend/app.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/video2commons/frontend/app.py b/video2commons/frontend/app.py index c2ebfce..374a524 100644 --- a/video2commons/frontend/app.py +++ b/video2commons/frontend/app.py @@ -240,14 +240,18 @@ def logincallback(): is_contributor = identify["editcount"] >= 50 is_maintainer = is_sudoer(identify["username"]) is_autoconfirmed = "autoconfirmed" in identify["rights"] - is_confirmed = "confirmed" in identify["rights"] - # Only allow autoconfirmed users either with at least 50 edits, or - # confirmed users, or maintainer status to use this tool. + # In Commons 'confirmed' is a group that inherits from 'autoconfirmed', so + # as a result it doesn't have its own distinct right. + is_confirmed = "confirmed" in identify["groups"] + + # Only allow autoconfirmed users with at least 50 edits, manually confirmed + # users, or users with maintainer status to use this tool. if not ((is_autoconfirmed and (is_contributor or is_maintainer)) or is_confirmed): return render_template( "error.min.html", - message = ("You do not meet the requirements. To use this tool, please " + html_message=( + "You do not meet the requirements. To use this tool, please " '' "apply to be a confirmed user, clearly explaining why you need to use video2commons." ),