Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Allow filtering for admins in the list accounts admin API #16114

Merged
merged 2 commits into from
Aug 18, 2023

Conversation

afechler
Copy link
Contributor

@afechler afechler commented Aug 15, 2023

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Pull request includes a sign off
  • Code style is correct
    (run the linters)

@afechler afechler requested a review from a team as a code owner August 15, 2023 12:43
@clokep
Copy link
Member

clokep commented Aug 15, 2023

@afechler Please sign-off on your changes.

Comment on lines +227 to +231
filters.append("admin = 1")
else:
filters.append("admin = 0")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside: I wonder if this was missed in #15515?

Copy link
Contributor

@DMRobertson DMRobertson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see the docs and docstring phrasing changed; everything else is a nice-to-have.

@@ -0,0 +1 @@
Query-Parameter added to Admin-API /users to filter admins from user list.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Query-Parameter added to Admin-API /users to filter admins from user list.
Add an `admins` query parameter to the [List Accounts](https://matrix-org.github.io/synapse/v1.91/admin_api/user_admin_api.html#list-accounts) [admin API](https://matrix-org.github.io/synapse/v1.91/usage/administration/admin_api/index.html), to include only admins or to exclude admins in user queries.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I missed the changelog earlier.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have adopted the text.

Copy link
Contributor

@DMRobertson DMRobertson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'm happy if CI is!

@DMRobertson
Copy link
Contributor

DMRobertson commented Aug 18, 2023

CI passed except for a flake on 48feabf, going to merge manually.

@DMRobertson DMRobertson changed the title Query parameter added to filter admins. Allow filtering for admins in the list accounts admin API Aug 18, 2023
@DMRobertson DMRobertson merged commit 54317d3 into matrix-org:develop Aug 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants