Skip to content

Commit 54b0153

Browse files
committed
Accept the requested groups list as a set
Signed-off-by: Aurélien Bompard <[email protected]>
1 parent f34dda7 commit 54b0153

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ NEWS
1212
Bugfixes:
1313

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

1617

1718
------

flask_fas_openid.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,10 @@ def login(self, username=None, password=None, return_url=None,
265265

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

0 commit comments

Comments
 (0)