Skip to content

Commit

Permalink
Accept the requested groups list as a set
Browse files Browse the repository at this point in the history
Signed-off-by: Aurélien Bompard <[email protected]>
  • Loading branch information
abompard committed Nov 25, 2020
1 parent f34dda7 commit 54b0153
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ NEWS
Bugfixes:

* Membership of the "signed_fpca" group was not always requested.
* Handle the requested group list being passed as a set (wink wink Pagure).


------
Expand Down
4 changes: 4 additions & 0 deletions flask_fas_openid.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ def login(self, username=None, password=None, return_url=None,

if isinstance(groups, six.string_types):
groups = [groups]
# Some applications pass the group list as a set. Convert to a list in
# case we need to append to it (see below).
if isinstance(groups, set):
groups = list(groups)
# In the new AAA system, we know a user has signed the FPCA by looking
# a group membership. We must therefore always request the
# corresponding group.
Expand Down

0 comments on commit 54b0153

Please sign in to comment.