feat(v3.0): implémentation Phases 0-8 — RBAC, lifecycle, multi-org, plans, dashboards
Phase 0 : @RolesAllowed SUPER_ADMIN sur POST/DELETE organisations ; AuthenticationFilter pages super-admin Phase 2 : OrganisationModuleService, @RequiresModule, ModuleAccessFilter, RoleService, PermissionChecker Phase 3 : multi-org context switching (OrganisationContextFilter, headers X-Active-Organisation-Id / X-Active-Role) Phase 4 : feature-gating navigation par typeOrganisation (web MenuBean + mobile MorePage) Phase 5 : MemberLifecycleService — 8 transitions (activer/suspendre/radier/archiver/inviter/accepter/expirer/rappels) Phase 6 : FormuleAbonnement Option C (planCommercial, apiAccess, federationAccess, quotas) + SouscriptionOrganisation méthodes quota Phase 7 : DashboardResource SUPER_ADMIN ajouté ; DashboardBean.checkAccessAndRedirect() ; dashboards distincts par rôle Phase 8 : MembreResourceLifecycleRbacTest, SouscriptionQuotaOptionCTest, OrganisationContextHolderTest, OrganisationContextFilterMultiOrgTest, MemberLifecycleServiceTest
This commit is contained in:
@@ -3,6 +3,7 @@ package dev.lions.unionflow.server.resource.culte;
|
||||
import dev.lions.unionflow.server.api.dto.culte.DonReligieuxDTO;
|
||||
import dev.lions.unionflow.server.service.culte.DonReligieuxService;
|
||||
|
||||
import dev.lions.unionflow.server.security.RequiresModule;
|
||||
import jakarta.annotation.security.RolesAllowed;
|
||||
import jakarta.inject.Inject;
|
||||
import jakarta.validation.Valid;
|
||||
@@ -16,13 +17,14 @@ import java.util.UUID;
|
||||
@Path("/api/v1/culte/dons")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@RequiresModule("CULTE_DONS")
|
||||
public class DonReligieuxResource {
|
||||
|
||||
@Inject
|
||||
DonReligieuxService donReligieuxService;
|
||||
|
||||
@POST
|
||||
@RolesAllowed({ "membre_actif", "admin", "admin_organisation" })
|
||||
@RolesAllowed({ "ADMIN", "SUPER_ADMIN", "ADMIN_ORGANISATION", "MEMBRE", "USER" })
|
||||
public Response enregistrerDon(@Valid DonReligieuxDTO dto) {
|
||||
DonReligieuxDTO response = donReligieuxService.enregistrerDon(dto);
|
||||
return Response.status(Response.Status.CREATED).entity(response).build();
|
||||
@@ -30,7 +32,7 @@ public class DonReligieuxResource {
|
||||
|
||||
@GET
|
||||
@Path("/{id}")
|
||||
@RolesAllowed({ "admin", "admin_organisation", "culte_resp", "membre_actif" })
|
||||
@RolesAllowed({ "ADMIN", "SUPER_ADMIN", "ADMIN_ORGANISATION", "CULTE_RESP", "MEMBRE", "USER" })
|
||||
public Response getDonById(@PathParam("id") UUID id) {
|
||||
DonReligieuxDTO response = donReligieuxService.getDonById(id);
|
||||
return Response.ok(response).build();
|
||||
@@ -38,7 +40,7 @@ public class DonReligieuxResource {
|
||||
|
||||
@GET
|
||||
@Path("/organisation/{organisationId}")
|
||||
@RolesAllowed({ "admin", "admin_organisation", "culte_resp" })
|
||||
@RolesAllowed({ "ADMIN", "SUPER_ADMIN", "ADMIN_ORGANISATION", "CULTE_RESP" })
|
||||
public Response getDonsByOrganisation(@PathParam("organisationId") UUID organisationId) {
|
||||
List<DonReligieuxDTO> response = donReligieuxService.getDonsByOrganisation(organisationId);
|
||||
return Response.ok(response).build();
|
||||
|
||||
Reference in New Issue
Block a user