Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(admin): 3259 - Donner les droits apres la fin de la date d'instruction aux référents #4524

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

naustra
Copy link
Collaborator

@naustra naustra commented Nov 7, 2024

@naustra naustra changed the title Mark extraneous package in npm 10.8.2 admin(admin): Donner les droits apres la fin de la date d'instruction aux référents Nov 12, 2024
@naustra naustra changed the title admin(admin): Donner les droits apres la fin de la date d'instruction aux référents feat(admin): Donner les droits apres la fin de la date d'instruction aux référents Nov 12, 2024
@naustra naustra changed the title feat(admin): Donner les droits apres la fin de la date d'instruction aux référents feat(admin): 3259 - Donner les droits apres la fin de la date d'instruction aux référents Nov 12, 2024
admin/src/scenes/volontaires/view/index.tsx Outdated Show resolved Hide resolved
@@ -43,7 +43,7 @@ export default function Index({ ...props }) {
? "correction"
: "readonly";
const cohort = cohorts.find(({ _id, name }) => _id === young?.cohortId || name === young?.cohort);
if (user.role !== ROLES.ADMIN && new Date() > new Date(cohort?.instructionEndDate || "")) {
if (![ROLES.ADMIN, ROLES.REFERENT_REGION].includes(user.role) && new Date() > new Date(cohort?.instructionEndDate || "")) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

il devrait aussi avoir un contrôle du côté de l'api pour empêcher la modification en fonction des droits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants