Refactor `Groups::EpicIssuesController` and `Groups::EpicLinksController`
While implementing #update for Groups::EpicLinksController, it surprised me that it was already handling #update and returning a response even when I haven't added any code.
Both Groups::EpicIssuesController and Groups::EpicLinksController inherit from Groups::EpicsController which seems unnecessary.
Groups::EpicsController handles a lot of things that are not related to these two controllers.
It might be better to inherit from Groups::ApplicationController instead and just add extra methods that are needed to prevent unexpected behavior in the future.
From my initial check, here are a few things we need to do:
-
Implement
#epicto find the currentEpicbeing referenced to from the URL params and check read permissions. Looks like this is really the only method we are using fromGroups::EpicsController.Not sure if we also need
before_action :epic, except: [:index, :create]that's also inGroups::EpicsController -
Remove the now unneeded
skip_before_actions inapp/controllers/concerns/epic_relations.rb -
Add a
check_epics_available!before filter so we retain current behavior.