atlassian-api / atlassian-python-api

Atlassian Python REST API wrapper
https://atlassian-python-api.readthedocs.io
Apache License 2.0
1.29k stars 642 forks source link

Find users with permission to a Jira project #1293

Open ZlobinaElena opened 5 months ago

ZlobinaElena commented 5 months ago

Hello!

I hope this message finds you well. I am currently using your Python library for Jira and I'm facing a challenge in retrieving users with permissions for a specific Jira project.

After some research, I found that the Jira REST API provides an endpoint that suits my needs: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-user-search/#api-rest-api-2-user-permission-search-get However, it seems that your library doesn't currently include a method to interact with this endpoint. I wanted to reach out and inquire whether such a method is available or if there are plans to implement it in the future.

Request: I would greatly appreciate it if you could guide me on how to achieve this or, if not available, consider adding a method to the library that utilises the mentioned API endpoint. Possible Method Signature:

def get_users_with_project_permissions(project_key):
    """
    Retrieves users with permissions for the specified Jira project.
    :param query: A query string that is matched against user attributes, such as displayName and emailAddress, to find relevant users. 
    :param permissions: A comma separated list of permission types.
    :param issue_key: The issue key for the issue.
    :param project_key: The key of the Jira project.
    :param limit: The maximum number of items to return per page.
    :param start: The index of the first item to return in a page of results (page offset).
    :return: A list of users with permissions for the project/issue.
    """

Regards, Elena