-
Notifications
You must be signed in to change notification settings - Fork 91
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
Feature ouidou/admin creation delegation gestionnaire page children management #9566
Conversation
1d454c3
to
528c51c
Compare
Il y a plusieurs tests unitaires qui ne passent pas. |
@krichtof etrangement il ne joue pas la migration avant le test. aurais tu une idee de pourquoi ? je vais aussi degarder de mon coté |
@seb-by-ouidou Je crois que tu as oublié de commiter |
@krichtof fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merci pour cette PR :)
Juste quelques demandes de correction mineures avant approbation.
gestionnaire = Gestionnaire.find(params[:id]) | ||
|
||
if !gestionnaire.can_be_deleted? | ||
fail "Impossible de supprimer ce gestionnaire car il est gestionnaire d'un groupe racine" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Peux-tu plutôt utiliser flash[:alert]
?
(je crois qu'on utilise fail une ou deux fois dans le manager mais nous allons également le corriger)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
belongs_to :groupe_gestionnaire, optional: true # parent | ||
has_many :children, class_name: "GroupeGestionnaire", inverse_of: :groupe_gestionnaire | ||
# belongs_to :groupe_gestionnaire, optional: true # parent | ||
# has_many :children, class_name: "GroupeGestionnaire", inverse_of: :groupe_gestionnaire | ||
has_many :administrateurs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Peux-tu du coup supprimer ces 2 lignes plutôt que de les laisser en commentaire ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
a6ea607
#9111
ETQ super-admin, déléguer la création des comptes administrateurs à des "gestionnaires de groupe - USER STORIES
ETQ super-admin, déléguer la création des comptes administrateurs à des "gestionnaires de groupe - LOT 2 de DEV
add children group