Skip to content

Commit

Permalink
Merge branch 'stable' of https://github.com/LibrIT/passhport into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
elg committed Oct 11, 2019
2 parents dbdff8a + 9edcfaa commit 1cd4d5d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions passhportd/app/models_mod/usergroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,14 @@ def accessible_target_list(self, checked_usergroups = [], mode="string"):
accessible_targets.append(target)

# 2. list all targets accessible through usergroups
for usergroup in self.gmembers:
for usergroup in self.containedin:
if usergroup not in checked_usergroups:
checked_usergroups.append(usergroup)
for target in usergroup.accessible_target_list(checked_usergroups):
if target not in self.targets:
for target in usergroup.accessible_target_list(
checked_usergroups, mode="obj"):
if target not in accessible_targets:
if mode == "string":
print(target)
accessible_targets.append(target.name)
else:
accessible_targets.append(target)
Expand Down

0 comments on commit 1cd4d5d

Please sign in to comment.