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

Roles : restreindre la suppression de créneaux (et de bucket) aux ADMIN #765

Merged
merged 2 commits into from
Feb 26, 2023

Conversation

raphodn
Copy link
Member

@raphodn raphodn commented Feb 22, 2023

Quoi ?

Restreindre les routes shift_delete et bucket_delete aux ROLE_ADMIN

Pourquoi ?

  • pour éviter les erreurs
  • actuellement on ne log pas les actions de suppression effectuées sur ces objets

</button>
{{ form_end(shift_delete_forms[shift.id]) }}
{% if is_granted("ROLE_ADMIN") %}
{% if not shift.lastShifter %}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pourquoi ne pas concatener les if ensemble ?

Copy link
Member Author

Choose a reason for hiding this comment

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

pour bien séparer la section "ADMIN" de "non-ADMIN"
dans ce cas là il y a qu'un seul bouton, mais on pourrait imaginer que cette section soit plus grande
je trouve ça plus clair :)

@raphodn raphodn merged commit 60be20a into master Feb 26, 2023
@raphodn raphodn deleted the raphodn/shift-delete-admin branch February 26, 2023 15:00
quot17 pushed a commit to quot17/gestion-compte that referenced this pull request Mar 28, 2023
…IN (elefan-grenoble#765)

* Only ADMIN can delete shift. add ShiftDeletedEvent

* Only ADMIN can delete bucket. Rename bucket_add_form
OursDesCavernes pushed a commit to Les400Coop/gestion-compte that referenced this pull request Jan 20, 2024
…IN (elefan-grenoble#765)

* Only ADMIN can delete shift. add ShiftDeletedEvent

* Only ADMIN can delete bucket. Rename bucket_add_form
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