511 fix habilitar edição de instituição e gerenciamento de usuários pelo coordenador #512
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Este pull request introduz várias alterações para melhorar o controle de acesso baseado em função e a navegação dentro do aplicativo. As alterações mais importantes incluem a atualização de condições para exibir links e modificar verificações de permissão para operações do usuário.
Melhorias no controle de acesso baseado em funções:
src/components/Sidebar.jsx
: Adicionada uma verificação parauser.institutionId
para garantir que o link para "Minha Instituição" seja exibido somente se o usuário estiver associado a uma instituição. O link agora inclui dinamicamente oinstitutionId
.src/pages/CreateUserPage.jsx
: A verificação de permissão foi atualizada para permitir que usuários com a funçãoCOORDENADOR
editem usuários, além da funçãoADMIN
.src/pages/InstitutionPage.jsx
: A lógica de filtragem baseada em função foi aprimorada para permitir que usuáriosCOORDINATOR
gerenciem usuários com funções inferiores aCOORDINATOR
e para permitir que as funçõesPUBLISHER
eAPPLIER
gerenciem funçõesUSER
.Obs: no momento da solicitação dessa PR, rodar com a 137 do back.