Add filter for disabled users to superuser user list API
Fixes https://jira.coreos.com/browse/QS-102
This commit is contained in:
parent
1d3a93efcb
commit
8e473b9779
6 changed files with 44 additions and 19 deletions
|
@ -750,8 +750,11 @@ def get_private_repo_count(username):
|
|||
.count())
|
||||
|
||||
|
||||
def get_active_users():
|
||||
return User.select().where(User.organization == False, User.robot == False)
|
||||
def get_active_users(disabled=True):
|
||||
query = User.select().where(User.organization == False, User.robot == False)
|
||||
if not disabled:
|
||||
query = query.where(User.enabled == True)
|
||||
return query
|
||||
|
||||
|
||||
def get_active_user_count():
|
||||
|
|
Reference in a new issue