Add ChangeUserStatusBase to User actions to remove code duplication

Created on 23 January 2022, over 2 years ago
Updated 13 February 2023, over 1 year ago

Problem/Motivation

Right now the access function in both BlockUser & UnblockUser classes is identical. This is unnecessary code duplication as the two classes handle the same type of functionality.

Steps to reproduce

N/A

Proposed resolution

Add a new abstract class, ChangeUserStatusBase and have both BlockUser and UnblockUser extend that. There is already precedent for this in the user module with ChangeUserStatusBase.

Remaining tasks

  • Agree on approach
  • Review
  • Commit
  • CR?

User interface changes

None

API changes

New abstract class ChangeUserStatusBase
Access function removed from BlockUser & UnblockUser
BlockUser & UnblockUser now extend ChangeUserStatusBase

Data model changes

None

Release notes snippet

TODO

πŸ“Œ Task
Status

Needs work

Version

10.0 ✨

Component
User moduleΒ  β†’

Last updated 1 day ago

Created by

πŸ‡³πŸ‡ΏNew Zealand DanielVeza Brisbane, AU

Live updates comments and jobs are added and updated live.
  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024