From 37f9acd969dbbbba0f42f6317db77ec7726e7daf Mon Sep 17 00:00:00 2001 From: Ilikelinux l Date: May 22 2025 21:57:49 +0000 Subject: Update fedora_elections/elections.py Replaced CLA with FPCA. Also added a link to the first message, which should bring the user to the right place to agree to the FPCA. However I do not know if this is an issue using $USERNAME to indicate the alias substitution? Also not enough experience with flask.flash If we could use
to make a two line Error Message? --- diff --git a/fedora_elections/elections.py b/fedora_elections/elections.py index 28fd306..9c617a6 100644 --- a/fedora_elections/elections.py +++ b/fedora_elections/elections.py @@ -49,7 +49,7 @@ def login_required(f): flask.url_for("oidc_auth.login", next=flask.request.url) ) elif not flask.g.fas_user.cla_done: - flask.flash("You must sign the CLA to vote", "error") + flask.flash("You must sign the FPCA to vote (https://accounts.fedoraproject.org/user/$USERNAME/settings/agreements/)", "error") return safe_redirect_back() return f(*args, **kwargs) @@ -97,7 +97,7 @@ def vote(election_alias): election.requires_plusone and "fedora-contributor" not in flask.g.fas_user.groups ): - flask.flash("You need to be in one another group than CLA to vote", "error") + flask.flash("You need to be in one another group than FPCA to vote", "error") return safe_redirect_back() # Or if the election is restricted to specific groups