Skip to content

Commit

Permalink
added check for user role
Browse files Browse the repository at this point in the history
  • Loading branch information
akaila-splunk committed Nov 8, 2023
1 parent f40d2e8 commit 54a6926
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion splunklib/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3476,7 +3476,8 @@ def role_entities(self):
:return: The list of roles.
:rtype: ``list``
"""
return [self.service.roles[name] for name in self.content.roles]
all_role_names = [r.name for r in self.service.roles.list()]
return [self.service.roles[name] for name in self.content.roles if name in all_role_names]


# Splunk automatically lowercases new user names so we need to match that
Expand Down

0 comments on commit 54a6926

Please sign in to comment.