Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
datamel committed Jul 20, 2021
1 parent ff9fcee commit 06bd627
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions cylc/uiserver/authorise.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,7 @@ def get_groups(username: str) -> List[str]:
Returns:
list: system groups for username given
"""
# NGROUPS_MAX used to ensure we are not sending a groups number which is
# too big for the system which would result in an OverflowError when
# fetching groups
groupmax = os.NGROUPS_MAX
group_ids = os.getgrouplist(username, groupmax)
group_ids.remove(groupmax)
group_ids = os.getgroups()
# turn list of group_ids into group names with group identifier prepended
return list(map(
lambda x: f'{Authorization.GRP_IDENTIFIER}{grp.getgrgid(x).gr_name}',
Expand Down

0 comments on commit 06bd627

Please sign in to comment.