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:

  1. Implement #epic to find the current Epic being referenced to from the URL params and check read permissions. Looks like this is really the only method we are using from Groups::EpicsController.

    Not sure if we also need before_action :epic, except: [:index, :create] that's also in Groups::EpicsController

  2. Remove the now unneeded skip_before_actions in app/controllers/concerns/epic_relations.rb

  3. Add a check_epics_available! before filter so we retain current behavior.

Assignee Loading
Time tracking Loading