Creating a role redirects to the Users page instead of the Roles page

Aperta Adatta ai principianti
#676 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@tungleduyxyz ci sta già lavorando.

Dal 1/11/2026.

  • #680 di @tungleduyxyz — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rails, ruby
Ambito
backend

Direzione di ricerca

Leggi app/controllers/kaui/role_definitions_controller.rb, in particolare create e il reindirizzamento esistente di update. Controlla i test funzionali per la creazione dei ruoli e aggiungi un'asserzione che verifichi che il percorso di creazione predefinito reindirizzi a /role_definitions, preservando il comportamento del contesto di ritorno. Il lavoro è completato quando il nuovo test passa e la notifica di successo include il nome del ruolo, come richiesto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

After creating a role from the Roles page, Kaui redirects to the Users page (/admin_allowed_users) instead of back to the Roles list (/role_definitions).

Steps to reproduce

  1. Open Roles (/role_definitions) and click Create Role.
  2. Enter a role name and permissions, then click Save Role.

Expected

The role is created and the browser returns to the Roles list, where the new role appears.

Actual

The flash notice "Role was successfully created" is shown on the Users page.

Cause

Kaui::RoleDefinitionsController#create falls back to admin_allowed_users_path when there is no role_return_context in the session:

https://github.com/killbill/killbill-admin-ui/blob/master/app/controllers/kaui/role_definitions_controller.rb

else
  redirect_to admin_allowed_users_path, notice: 'Role was successfully created'
end

update already redirects to role_definitions_path, so create should do the same. The existing redirect back to the user form (when the role was started from the new/edit user screen via role_return_context) is intentional and should stay.

Suggested fix

Redirect to role_definitions_path in the default branch, and include the role name in the notice for consistency with update and the return-context branches. Add a functional test asserting the redirect.

Lingua principale
HTML
Stelle
69
Fork
75
Merge medio
2g 14h
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di killbill/killbill-admin-ui

Tutte le issue di killbill/killbill-admin-ui

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.