Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions video2commons/frontend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,17 @@ 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 "
'<a href="https://commons.wikimedia.org/wiki/Commons:Requests_for_rights#Confirmed">'
"apply to be a confirmed user</a>, clearly explaining why you need to use video2commons."
),
Comment thread
royjor2016 marked this conversation as resolved.
loggedin=True,
username=identify["username"],
)
Expand Down
Loading