Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add project_securitylevels method #1919

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
17 changes: 17 additions & 0 deletions jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3365,6 +3365,23 @@ def project_components(self, project: str) -> list[Component]:
]
return components

@translate_resource_args
def project_securitylevels(self, project: str | int) -> list[SecurityLevel]:
"""Get a list of securitylevel Resources for the current user on a project.

Args:
project (Union[str, int]): ID or key of the project to get securitylevels of

Returns:
List[SecurityLevel]
"""
r_json = self._get_json("project/" + str(project) + "/securitylevel")
security_levels = [
SecurityLevel(self._options, self._session, raw_securitylevel_json)
for raw_securitylevel_json in r_json["levels"]
]
return security_levels

@translate_resource_args
def project_versions(self, project: str) -> list[Version]:
"""Get a list of version Resources present on a project.
Expand Down
Loading