feat: implementa user pesquisa de teste

This commit is contained in:
NANDO9322 2026-02-06 10:30:26 -03:00
parent b2f8c00b13
commit 82b597bda3
2 changed files with 2 additions and 1 deletions

View file

@ -335,6 +335,7 @@ func (s *Service) EnsureDemoUsers(ctx context.Context) error {
{"foto@photum.com", RolePhotographer, "COLABORADOR PHOTUM", []string{"SP"}},
{"cliente@photum.com", RoleEventOwner, "CLIENTE TESTE", []string{"SP"}},
{"pesquisa@photum.com", RoleResearcher, "PESQUISADOR", []string{"SP"}},
{"viewer@photum.com", RoleAgendaViewer, "VISUALIZADOR PHOTUM", []string{"SP", "MG"}},
}
for _, u := range demoUsers {

View file

@ -972,7 +972,7 @@ export const DataProvider: React.FC<{ children: ReactNode }> = ({
};
const getEventsByRole = (userId: string, role: string) => {
if (role === "SUPERADMIN" || role === "BUSINESS_OWNER" || role === "RESEARCHER") {
if (role === "SUPERADMIN" || role === "BUSINESS_OWNER" || role === "RESEARCHER" || role === "AGENDA_VIEWER" || role === UserRole.AGENDA_VIEWER) {
return events;
}
if (role === "EVENT_OWNER") {