mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-22 02:11:26 -07:00
If `all=True` is not set then by default only 20 records will be
returned when calling `list()`. Use `all=True` so that all records
will be returned.
For the `list()` use where do not desire to retrieve all entries then
use`all=False` to show explicityly that we don't want to get all of
the entries.
Fixes: #3729
Fixes: #4460
(cherry picked from commit fe4bbc5de3
)
Co-authored-by: John Villalovos <john@sodarock.com>
This commit is contained in:
parent
70a3dae965
commit
19ba15a783
7 changed files with 33 additions and 10 deletions
|
@ -349,7 +349,7 @@ class GitLabUser(object):
|
|||
@param sshkey_name Name of the ssh key
|
||||
'''
|
||||
def ssh_key_exists(self, user, sshkey_name):
|
||||
keyList = map(lambda k: k.title, user.keys.list())
|
||||
keyList = map(lambda k: k.title, user.keys.list(all=True))
|
||||
|
||||
return sshkey_name in keyList
|
||||
|
||||
|
@ -519,7 +519,7 @@ class GitLabUser(object):
|
|||
@param username Username of the user
|
||||
'''
|
||||
def find_user(self, username):
|
||||
users = self._gitlab.users.list(search=username)
|
||||
users = self._gitlab.users.list(search=username, all=True)
|
||||
for user in users:
|
||||
if (user.username == username):
|
||||
return user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue