1
2
3 import flask
4 from coprs.logic.outdated_chroots_logic import OutdatedChrootsLogic
5
6
8 if not flask.g.user:
9 return
10
11 if not OutdatedChrootsLogic.has_not_reviewed(flask.g.user):
12 return
13
14 url = flask.url_for("user_ns.repositories", _external=True)
15 flask.flash("Some of the chroots you maintain are <b>newly marked EOL</b>, "
16 " and will be removed in the future. Please review "
17 "<a href='{0}'>{0}</a> to hide this warning."
18 .format(url), "warning")
19
20
21 coprs_ns = flask.Blueprint("coprs_ns", __name__, url_prefix="/coprs")
22 coprs_ns.before_request(flash_outdated_chroots_warning)
23