'Get a list of user Resources that match a username string and have browse permission for the issue or project.
:param user: a string to match usernames against.
:param issueKey: find users with browse permission for this issue.
:param projectKey: find users with browse permission for this project.
:param startAt: index of the first user to return.
:param maxResults: maximum number of users to return.
If maxResults evaluates as False, it will try to get all items in batches.'

def search_allowed_users_for_issue(self, user, issueKey=None, projectKey=None, startAt=0, maxResults=50):

    params = {u'username': user}
    if (issueKey is not None):
        params[u'issueKey'] = issueKey
    if (projectKey is not None):
        params[u'projectKey'] = projectKey
    return self._fetch_pages(User, None, u'user/viewissue/search', startAt, maxResults, params)
