Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Extract organiser grant/revoke diffing from Admin::WorkshopsController

Offen
#2,941 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@davidmillen50 arbeitet bereits daran.

Seit 19.10.2026.

  • #3049 von @davidmillen50 — offen

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
68/100
Issue-Typ
Refactoring
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
rails, ruby
Bereich
backend

Rechercherichtung

Read Admin::WorkshopsController and the existing app/services/ service objects to follow project conventions. Trace create and update, including assign_organisers_or_default and update_workshop_details, then run the existing admin workshop controller specs. Done means role changes behave identically for create/update, including the default-to-chapter-organisers path, and the controller no longer contains role-diffing logic.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

refactoring tech debt

Parent: #2938

Problem

Admin::WorkshopsController mutates Member roles directly from private controller methods, on both create (assign_organisers_or_default) and update (update_workshop_details):

def grant_organiser_access(organiser_ids = [])
  organiser_ids.each { |id| Member.find(id).add_role(:organiser, @workshop) }
end

def revoke_organiser_access(organiser_ids)
  (@workshop.organisers.pluck(:id).map(&:to_s) - organiser_ids).each do |id|
    Member.find(id).revoke(:organiser, @workshop)
  end
end

Diffing desired vs current organisers and mutating roles is application-layer orchestration, not HTTP coordination.

Proposed change

  • Extract the diff + grant/revoke into a service object under app/services/ (follow the existing *_service conventions there; naming up to the implementer).
  • The controller calls it from create/update; the default-to-chapter-organisers branch moves with it.

Acceptance

  • Admin::WorkshopsController no longer contains role-diffing logic.
  • Organiser membership changes identically after create/update, including the default-to-chapter-organisers path.
  • Existing admin workshop controller specs pass.
Vorherrschende Sprache
Ruby
Sterne
106
Forks
208
Ø Merge
19 Std. 31 Min.
Gemergte PRs (30 T.)
84

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus codebar/planner

Alle Issues in codebar/planner

Ähnliche Issues

Weitere Issues zu Ruby

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.