#4213 Ensure there are admin groups before adding them to the list of groups
Closed 2 years ago by pingou. Opened 2 years ago by pingou.

file modified
+7 -4
@@ -398,10 +398,13 @@ 

          return flask.redirect(return_point)

  

      admins = pagure_config["ADMIN_GROUP"]

-     if isinstance(admins, list):

-         admins = set(admins)

-     else:  # pragma: no cover

-         admins = set([admins])

+     if admins:

+         if isinstance(admins, list):

+             admins = set(admins)

+         else:  # pragma: no cover

+             admins = set([admins])

+     else:

+         admins = set()

  

      if auth in ["fas", "openid"]:

          from pagure.ui.fas_login import FAS

If in the config ADMIN_GROUP is defined as None, it was added to the
list of groups to query the openid server for.
Which resulted in a set containing a None element, which broke loging
in.

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

pretty please pagure-ci rebuild

2 years ago

Pull-Request has been closed by pingou

2 years ago