Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Role and study-admin privilege changes send no notification to the affected user

Aberta
#930 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
58/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Pouca atividade
Stack de tecnologia
typescript
Domínio
authentication

Direção de pesquisa

Start with UsersController.updateUserRole, UsersController.makeStudyAdmin, and UsersController.removeStudyAdmin, then trace how the project currently sends notification emails. Check related issues #928 and #929 for existing notification patterns. Done means each listed role or study-admin transition sends an appropriate email to the affected user.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

backend bug Notifications

Three admin-initiated endpoints let a caller change a user's role or study admin privileges but none of them notify the affected user:

  • PATCH /users/{userID}/role (UsersController.updateUserRole) — OperatorAdmin can change any user's role between OperatorAdmin, OrganisationAdmin, StudyAdmin, and Participant
  • POST /users/{userId}/make-study-admin/{studyId} (UsersController.makeStudyAdmin) — grants StudyAdmin over a specific study
  • POST /users/{userId}/remove-study-admin/{studyId} (UsersController.removeStudyAdmin) — removes StudyAdmin from a specific study

Being promoted to OrganisationAdmin (or having admin privileges revoked) is an auth-relevant change the user should be aware of, both for their own visibility and as an audit signal in case the change was made by a compromised admin account.

Related to #928 and #929 which flag the same silent behaviour on password reset and profile edits.

Suggested fix: send a notification email on each of these transitions ("You have been made a StudyAdmin of X" / "Your CTRL admin role has been changed to Y" / "You are no longer a StudyAdmin of X. If this wasn't you, contact support.").

Linguagem predominante
TypeScript
Estrelas
4
Forks
0
Merge médio
14h 50min
PRs com merge (30d)
5

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Garvan-Data-Science-Platform/ctrl

Todas as issues de Garvan-Data-Science-Platform/ctrl

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.