Skip to content

Commit

Permalink
Merge pull request #2419 from marklise/175-2
Browse files Browse the repository at this point in the history
175: Fix permission getter due to other groups coming back from KC.
  • Loading branch information
marklise authored Oct 30, 2024
2 parents 846ddbc + 20885c9 commit 96f1fdf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion epictrack-api/src/api/services/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ def get_groups(cls):
filtered_groups = []

for group in groups:
current_app.logger.info(f"group: {group}")
# For some reason we get all the groups from keycloak instead of just requesting the
# TRACK group. So we need to filter out the groups that are not TRACK based, otherwise
# we will get all the groups in the system.
if group.get("name") != "TRACK":
continue

# Check if the group has sub-groups by looking at the "subGroupCount" attribute
if group.get("subGroupCount", 0) > 0:
Expand Down

0 comments on commit 96f1fdf

Please sign in to comment.