In attempting to put together a form partial that houses all the inputs for a user creation I have a few questions on this.
Form Fields: first_name, last_name, email, password, password_confirmation, user_role_id.
The create and edit form can ONLY be accessed for an administrator. The form works great on the create side of things however I'm trying to think of how to handle the edit side. Right now the password field is obviously empty because of Laravel's default behavior of hiding the password input from the user model.
So for an administrator to edit a user what should I do to adjust for that. As the situation maybe just the email address or the name needs changed and then clicking the submit button won't have a value for password. Do I go ahead and make the password field non hidden.
Also what if the situation where an admin changes the user's role to something else while that user is currently logged in. What do I do about the fact that might enable/prevent the user from accessing parts of the application based on when they were logged in with that previous role.
Aucun commentaire:
Enregistrer un commentaire