fix: member list RPCs hide disabled users and groups but still return their role pairs
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 58/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- go, grpc
- Área
- api, authentication, authorization, backend
Línea de trabajo
Start from the five list RPCs named in the issue (ListProjectUsers, ListProjectServiceUsers, ListProjectGroups, ListOrganizationUsers, ListGroupUsers). Trace how they load members via GetByIDs versus how they build role_pairs from policies. Add an opt-in IncludeDisabled (or equivalent) on UserRepository.GetByIDs without changing other callers; GroupRepository already has that filter. Include disabled members with their existing state field so the list and role_pairs match. Add a test that disables a member and asserts agreement for all five RPCs, and confirm UI/SDK callers tolerate state=disabled.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
Five list RPCs return two things in one response:
- the member list (users, service users or groups)
role_pairs, a map of member id to roles
The RPCs are ListProjectUsers, ListProjectServiceUsers, ListProjectGroups, ListOrganizationUsers and ListGroupUsers.
The member list is loaded with GetByIDs. For users and groups, GetByIDs drops disabled rows. The role pairs are built straight from the policies, with no lookup.
A disabled user or group keeps its policies. So the response can have a role pair for an id that is missing from the list above it.
Disabling is reversible and is not a delete. These members are still real members.
Expected
The member list includes disabled users and groups. Each one carries its existing state field, set to disabled. This is the same state string (enabled or disabled) the user and group messages already return, so the API shape does not change.
The list and role_pairs then always agree. Clients that want to hide disabled members can filter on state.
Notes
GroupRepository.GetByIDsalready has anIncludeDisabledfilter.UserRepository.GetByIDshas no such option and always filters disabled users.- Other callers of
GetByIDsshould keep their current behaviour. Add an opt-in option instead of changing the default. - Check that the UI and SDK callers of these RPCs handle a
disabledstate before this ships. - Add a test that disables a member and checks the list and
role_pairsagree for all five RPCs.
- Lenguaje dominante
- Go
- Estrellas
- 344
- Forks
- 48
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 38
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de raystack/frontier
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
Todos los issues de raystack/frontier
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
LanternOps/breeze#8353 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
prime-radiant-inc/evener#4223 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
input.Scanner.Scan loops forever when the input reaches EOF, hanging every ConfirmAction promptPosiblemente ocupada @mlliarm la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
elastic/cloud-sdk-go#521 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
open-telemetry/opentelemetry-go-compile-instrumentation#1467 ·
Los mantenedores suelen responder en 3 días