Skip to content

fix: use TagStatusDeleted instead of QuestionStatusDeleted in tag permission - #1571

Merged
LinkinStars merged 1 commit into
apache:devfrom
Duansg:fix/tag-permission-status-constant
Aug 17, 2026
Merged

fix: use TagStatusDeleted instead of QuestionStatusDeleted in tag permission#1571
LinkinStars merged 1 commit into
apache:devfrom
Duansg:fix/tag-permission-status-constant

Conversation

@Duansg

@Duansg Duansg commented Aug 16, 2026

Copy link
Copy Markdown
Member

Summary

GetTagPermission compared the tag status against entity.QuestionStatusDeleted when deciding whether to expose the undelete action. The function operates on tag status, and the sibling delete / merge checks already use entity.TagStatusDeleted, so this aligns the undelete check with them.

Both constants are currently 10, so there is no behavior change; this only removes a latent inconsistency that would break tag recovery if the values ever diverge.

Changes

  • internal/service/permission/tag_permission.go: entity.QuestionStatusDeletedentity.TagStatusDeleted

Testing

  • go build ./internal/service/permission/ passes

@LinkinStars
LinkinStars self-requested a review August 17, 2026 04:22
@LinkinStars LinkinStars self-assigned this Aug 17, 2026

@LinkinStars LinkinStars left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@LinkinStars
LinkinStars changed the base branch from main to dev August 17, 2026 04:22
@LinkinStars
LinkinStars merged commit 2c0ced3 into apache:dev Aug 17, 2026
2 checks passed
@Duansg
Duansg deleted the fix/tag-permission-status-constant branch August 17, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants