Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor admin user filter query parameters #18965

Merged
merged 2 commits into from
Mar 2, 2022

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Mar 2, 2022

Follows

Changes:

  • Only pass status_filter on admin page
  • Use a more general method to pass query parameters, remove hard-coded keys

Fix the strange URL:

https://try.gitea.io/explore/users?page=3&sort=alphabetically&q=&status_filter[is_active]=&status_filter[is_admin]=&status_filter[is_restricted]=&status_filter[is_2fa_enabled]=&status_filter[is_prohibit_login]=

image

Only pass `status_filter` on admin page
Use a more general method to pass query parameters, remove hard-coded keys
@wxiaoguang wxiaoguang added type/refactoring Existing code has been cleaned up. There should be no new functionality. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Mar 2, 2022
@wxiaoguang wxiaoguang added this to the 1.17.0 milestone Mar 2, 2022
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 2, 2022
Copy link
Contributor

@fnetX fnetX left a comment

Choose a reason for hiding this comment

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

Thank you. I had fixed the default user explore locally by only optionally setting the pager paremeters if already present in the UR,L but it didn't work out. I apparently forgot about them in my second attempt which I made the PR of.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 2, 2022
@6543 6543 merged commit dd712b7 into go-gitea:main Mar 2, 2022
@wxiaoguang wxiaoguang deleted the refactor-admin-user-filter branch March 2, 2022 15:42
@fnetX
Copy link
Contributor

fnetX commented Mar 2, 2022

I think this should also be backported, since the PR this improves upon is also backported. In fact, I'd rather consider this to be part of the backported error fix, as releasing the current state would indeed lead into quite confusing URLs.

@6543
Copy link
Member

6543 commented Mar 2, 2022

@fnetX just send a backport ...

6543 pushed a commit that referenced this pull request Mar 2, 2022
Only pass `status_filter` on admin page
Use a more general method to pass query parameters, remove hard-coded keys

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 3, 2022
* giteaofficial/main:
  Don't clean up hardcoded `tmp` (go-gitea#18983)
  git backend ignore replace objects (go-gitea#18979)
  Improve the deletion of issue (go-gitea#18945)
  Add note to GPG key response if user has no keys (go-gitea#18961)
  adds restore docs for docker based instances (go-gitea#18844)
  Refactor admin user filter query parameters (go-gitea#18965)
a1012112796 added a commit to a1012112796/gitea that referenced this pull request Mar 3, 2022
* main:
  ignore missing comment for user notifications (go-gitea#18954)
  allow overwrite artifacts for github releases (go-gitea#18987)
  fix & refactor (go-gitea#18973)
  Don't clean up hardcoded `tmp` (go-gitea#18983)
  git backend ignore replace objects (go-gitea#18979)
  Improve the deletion of issue (go-gitea#18945)
  Add note to GPG key response if user has no keys (go-gitea#18961)
  adds restore docs for docker based instances (go-gitea#18844)
  Refactor admin user filter query parameters (go-gitea#18965)
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
Only pass `status_filter` on admin page
Use a more general method to pass query parameters, remove hard-coded keys
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants