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

Add user blocking #29028

Merged
merged 23 commits into from
Mar 4, 2024
Merged

Add user blocking #29028

merged 23 commits into from
Mar 4, 2024

Conversation

KN4CK3R
Copy link
Member

@KN4CK3R KN4CK3R commented Feb 2, 2024

Fixes #17453

This PR adds the abbility to block a user from a personal account or organization to restrict how the blocked user can interact with the blocker. The docs explain what's the consequence of blocking a user.

Screenshots:

grafik

grafik

grafik

@KN4CK3R KN4CK3R added type/feature Completely new functionality. Can only be merged if feature freeze is not active. topic/moderation features for moderating spam, abuse, ... labels Feb 2, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 2, 2024
@pull-request-size pull-request-size bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 2, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 3, 2024
Co-authored-by: Lauris BH <lauris@nix.lv>
services/issue/issue.go Outdated Show resolved Hide resolved
@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 Feb 4, 2024
lunny
lunny previously requested changes Feb 4, 2024
Copy link
Member

@lunny lunny left a comment

Choose a reason for hiding this comment

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

Looks like you missed a migration for the new table.

@KN4CK3R
Copy link
Member Author

KN4CK3R commented Feb 6, 2024

A few general issues I haven't debugged:

These are all more or less related to the new htmx code. Nothing I can/will fix in this PR.

When a blocked user tries to edit their existing comment, when pressing save it fails silently.

I added a specific error message here new but the "edit content" code does not handle errors, so it's not getting displayed (still nothing I can fix in this PR).

To prevent these missing UI errors I could hide the specific elements, so a user can't really access them in the first place.

@yardenshoham
Copy link
Member

I will fix whatever htmx problems happen, just open an issue and mention (@) me

@lunny lunny dismissed their stale review February 8, 2024 04:12

migrations added

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged labels Feb 8, 2024
@denyskon
Copy link
Member

denyskon commented Mar 2, 2024

@KN4CK3R Could you resolve conflicts?

@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 4, 2024
@lunny lunny added this to the 1.22.0 milestone Mar 4, 2024
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 4, 2024
@lunny lunny enabled auto-merge (squash) March 4, 2024 07:36
@lunny lunny added the type/changelog Adds the changelog for a new Gitea version label Mar 4, 2024
@lunny lunny merged commit c337ff0 into go-gitea:main Mar 4, 2024
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 4, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 4, 2024
* giteaofficial/main:
  Document that all unmerged feature PRs will be moved to next milestone when the feature freeze time comes (go-gitea#29578)
  Make admin pages wider because of left sidebar added and some tables become too narrow (go-gitea#29581)
  Refactor star/watch button (go-gitea#29576)
  Remove unnecessary SanitizeHTML from code (go-gitea#29575)
  Add missing database transaction for new issue (go-gitea#29490)
  Fix incorrect package link method calls in templates (go-gitea#29580)
  Move some asymkey functions to service layer (go-gitea#28894)
  Add user blocking (go-gitea#29028)

# Conflicts:
#	templates/repo/issue/view_content/context_menu.tmpl
@KN4CK3R KN4CK3R deleted the feature-user-block branch March 4, 2024 20:00
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2024
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. modifies/api This PR adds API routes or modifies them modifies/docs modifies/migrations modifies/translation size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. topic/moderation features for moderating spam, abuse, ... type/changelog Adds the changelog for a new Gitea version type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Block users