Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/openhound_jamf/lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ def client_has_permission(self, client_id: int, privilege: str):

@lru_cache
def client_permissions(self, client_id: int):
return self._find_single_object(
return self._find_all_objects(
f"""
SELECT role_name FROM {self.schema}.api_client_resolved_privileges
SELECT privilege FROM {self.schema}.api_client_resolved_privileges
WHERE client_id = ?
""",
""",
[client_id],
)

Expand Down
4 changes: 2 additions & 2 deletions src/openhound_jamf/models/api_integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ class ApiIntegration(JAMFAsset):
def as_node(self) -> JAMFNode:

all_privileges = []
for (role_name,) in self._lookup.client_permissions(self.id):
all_privileges.append(role_name)
for (privilege,) in self._lookup.client_permissions(self.id):
all_privileges.append(privilege)

properties = ApiIntegrationProperties(
name=self.display_name,
Expand Down
Loading