-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Allow bio updation without current password #7806
Conversation
Codecov Report
@@ Coverage Diff @@
## main #7806 +/- ##
==========================================
- Coverage 81.94% 81.89% -0.05%
==========================================
Files 97 101 +4
Lines 5627 5894 +267
==========================================
+ Hits 4611 4827 +216
- Misses 1016 1067 +51
|
@jywarren @VladimirMikulic can you kindly review ? Thanks ✌️ |
@jywarren @cesswairimu can you kindly review? Thanks ✌️ |
app/controllers/users_controller.rb
Outdated
@@ -57,7 +57,7 @@ def update | |||
@password_verification = user_verification_params | |||
@user = current_user | |||
@user = User.find_by(username: params[:id]) if params[:id] && logged_in_as(['admin']) | |||
if @user.valid_password?(user_verification_params["current_password"]) || user_verification_params["ui_update"].nil? | |||
if @user.valid_password?(user_verification_params["current_password"]) || user_verification_params["ui_update"].nil? || (user_verification_params["current_password"].blank? && user_verification_params["password"].blank? && user_verification_params["password_confirmation"].blank?) | |||
# correct password |
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.
Kindly change this comment
Kindly add corresponding unit-test. Thanks for your work |
@SidharthBansal Updated pr :) Can you kindly review again? Thanks ✌️ |
Thanks |
Hi 😄, this issue has been automatically marked as stale because it has not had recent activity. Don't worry you can continue to work on this and ask @publiclab/reviewers to add "work in progress" label 🎉 . Otherwise, it will be closed if no further activity occurs in 5 days -- but you can always re-open it if you like! 💯 Thank you for your contributions 🙌 🎈. |
Sorry I missed this! All good now!!! Thank you!!! |
Fixes #7756
Modified the user controller to allow bio updation without entering current password.
rake test
@publiclab/reviewers
for help, in a comment belowGIF
Thanks!