Skip to main content

Module role_assignment_handlers

Module role_assignment_handlers 

Source
Expand description

HTTP handlers for Story B0bis — CRUD REST role-assignments (gap Story 3.1).

Story 3.1 a livré l’entité UserRoleAssignment + UserRoleRepository + helpers RBAC, mais n’avait jamais exposé un endpoint REST pour assigner / lister / révoquer un sous-rôle. Cela bloquait toute UI d’administration (Phase B FE — RoleAssignmentForm / RoleAssignmentList).

Routes:

  • POST /users/{user_id}/role-assignments
  • GET /users/{user_id}/role-assignments
  • DELETE /users/{user_id}/role-assignments/{assignment_id}
  • GET /role-assignments?organization_id=&role= — listing admin filtré.

Auth (cohérent avec mandate_handlers / role_delegation_handlers) :

  • POST : superadmin OU syndic dans son organization.
  • GET : superadmin OU syndic OU le user lui-même (self).
  • DELETE : superadmin OU syndic-de-l-org.
  • GET admin list filtré : superadmin uniquement.

Structs§

AssignRoleRequest
ListRoleAssignmentsAdminQuery
UserRoleAssignmentResponse
assign_role
list_role_assignments_admin
list_role_assignments_for_user
revoke_role_assignment