#5486 [5.14.x] Fix issues observed in stg.pagure.io on EL8 after 5.14.1 release
Merged 4 months ago by wombelix. Opened 4 months ago by wombelix.
wombelix/pagure fix_issues_5.14.1_on_el8  into  5.14.x

file modified
+1 -1
@@ -40,7 +40,7 @@ 

            {% if (config.get('ENABLE_NEW_PROJECTS', True) and config.get('ENABLE_UI_NEW_PROJECTS', True))

            or config.get('ENABLE_GROUP_MNGT', False)  %}

            {#can_create is only defined if using OIDC so assume we cancreate #}

-           {% if (g.fas_user.can_create is not defined) or (g.fas_user.can_create is true)%}

+           {% if (g.fas_user.can_create is not defined) or (g.fas_user.can_create == true)%}

            <li class="nav-item dropdown ml-3">

              <a class="nav-link dropdown-toggle font-weight-bold"

                data-toggle="dropdown"

file modified
+2
@@ -34,6 +34,8 @@ 

  def fas_user_from_oidc():

      if "oidc_cached_userdata" in flask.session:

          flask.g.fas_user = munch.Munch(**flask.session["oidc_cached_userdata"])

+         # Edge case, avoid 'KeyError' after pagure update if a cached session is used

+         flask.g.fas_user.can_create = flask.g.fas_user.get("can_create", False)

      elif oidc.user_loggedin and "oidc_logintime" in flask.session:

          email_key, fulln_key, usern_key, ssh_key, groups_key = [

              pagure_config["OIDC_PAGURE_EMAIL"],

Related to https://pagure.io/pagure/issue/5485

The workaround in pagure/ui/oidc_login.py probably has to be ported to master too.

Pull-Request has been merged by wombelix

4 months ago