Refactor Todos::Destroy services to be more concrete
What does this MR do and why?
Related issue: #417455 (closed), extracted from !133543 (merged)
Refactor Todos::Destroy services to be more concrete
We move away from the reliance on base class methods, as it makes it hard to refactor. It was hard to refactor because part of the application logic was in the base class, part of the logic was in the concrete class.
After refactoring, it is clear that the authorized_users
method never
applied to all descendant classes - it only applied to one descendant.
Similarly the without_authorized
method only applied to a few
descendant claseses, but not all.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.