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

TRUNK-3779 User secret answer should be required if the question is set #836

Merged
merged 1 commit into from Apr 1, 2014

Conversation

ShubhamRai
Copy link
Contributor

No description provided.

@ShubhamRai
Copy link
Contributor Author

No I didnt make any change to web/WEB-INF/dwr-modules.xml.When i ran sudo mvn clean install this file appeared.

@dkayiwa
Copy link
Member

dkayiwa commented Mar 31, 2014

Can you remove it? Just in case you had not seen this:
http://go.openmrs.org/pull-request-tips

On Mon, Mar 31, 2014 at 11:48 AM, Shubham Rai notifications@github.comwrote:

No I didnt make any change to web/WEB-INF/dwr-modules.xml

Reply to this email directly or view it on GitHubhttps://github.com//pull/836#issuecomment-39065957
.

If we keep uppermost in our minds the unkind and unjust acts of others, we
shall find it impossible to love them as Christ has loved us; but if our
thoughts dwell upon the wondrous love and pity of Christ for us, the same
spirit will flow out to others.

@ShubhamRai
Copy link
Contributor Author

I have made the required changes.

@ShubhamRai
Copy link
Contributor Author

Do i have to write a test for the case in which both the question and answer is set correctly? I believe the test for that is already there.

@dkayiwa
Copy link
Member

dkayiwa commented Mar 31, 2014

Yes. If it exists, what is the test name?

@ShubhamRai
Copy link
Contributor Author

The test name is shouldChangeSecretQuestionAndAnswer() in OptionsFormControllerTest.java

@dkayiwa
Copy link
Member

dkayiwa commented Mar 31, 2014

Oh i see!!! You have good eyes. :)

On Mon, Mar 31, 2014 at 9:31 PM, Shubham Rai notifications@github.comwrote:

The test name is shouldChangeSecretQuestionAndAnswer() in
OptionsFormControllerTest.java

Reply to this email directly or view it on GitHubhttps://github.com//pull/836#issuecomment-39123995
.

If we keep uppermost in our minds the unkind and unjust acts of others, we
shall find it impossible to love them as Christ has loved us; but if our
thoughts dwell upon the wondrous love and pity of Christ for us, the same
spirit will flow out to others.

@ShubhamRai
Copy link
Contributor Author

Thanks :) .So now what i should do?

@dkayiwa
Copy link
Member

dkayiwa commented Mar 31, 2014

Have you responded to all the comments?

@ShubhamRai
Copy link
Contributor Author

No. I had a doubt regarding the comment on UserValidator. Do i have to add the condition i have added here in UserValidator also so that while creating a new User the same error does not repeat?

@dkayiwa
Copy link
Member

dkayiwa commented Mar 31, 2014

Is it possible to put the code in the validator, then reuse that validator
here?

On Mon, Mar 31, 2014 at 9:38 PM, Shubham Rai notifications@github.comwrote:

No. I had a doubt regarding the comment on UserValidator. Do i have to add
the condition i have added here in UserValidator also so that while
creating a new User the same error does not repeat?

Reply to this email directly or view it on GitHubhttps://github.com//pull/836#issuecomment-39124869
.

If we keep uppermost in our minds the unkind and unjust acts of others, we
shall find it impossible to love them as Christ has loved us; but if our
thoughts dwell upon the wondrous love and pity of Christ for us, the same
spirit will flow out to others.

@ShubhamRai
Copy link
Contributor Author

I am not sure about that. I'll check it out and then get back to you.As far as i can see now UserValidator.java is not dealing with advanced options

@dkayiwa
Copy link
Member

dkayiwa commented Mar 31, 2014

Some of our validators are not handling all the fields that they should be
dealing with. So if you see any missing, feel free to add. :)

On Mon, Mar 31, 2014 at 9:45 PM, Shubham Rai notifications@github.comwrote:

I am not sure about that. I'll check it out and then get back to you.As
far as i can see now UserValidator.java is dealing only with username value.

Reply to this email directly or view it on GitHubhttps://github.com//pull/836#issuecomment-39125734
.

If we keep uppermost in our minds the unkind and unjust acts of others, we
shall find it impossible to love them as Christ has loved us; but if our
thoughts dwell upon the wondrous love and pity of Christ for us, the same
spirit will flow out to others.

dkayiwa added a commit that referenced this pull request Apr 1, 2014
TRUNK-3779 User secret answer should be required if the question is set
@dkayiwa dkayiwa merged commit 5733221 into openmrs:master Apr 1, 2014
@ShubhamRai
Copy link
Contributor Author

I have put the check opts.getSecretQuestionPassword().equals("") because the error occurs only when the SecretQuestionPassword is not set. If the user enters the SecretQuestionPassword and then enters only the Question or Answer appropriate error messages are shown.
But if the user does not enter the password and then enters only question, no error messages were shown. Thats why I have put the error message code as "Password incorrect" and not "Secret Answer is required".

@dkayiwa
Copy link
Member

dkayiwa commented Apr 1, 2014

Oh i see!!! Thanks :)

On Tue, Apr 1, 2014 at 2:16 PM, Shubham Rai notifications@github.comwrote:

I have put the check opts.getSecretQuestionPassword().equals("") because
the error occurs only when the SecretQuestionPassword is not set. If the
user enters the SecretQuestionPassword and then enters only the Question or
Answer appropriate error messages are shown.
But if the user does not enter the password and then enters only question,
no error messages were shown. Thats why I have put the error message code
as "Password incorrect" and not "Secret Answer is required".

Reply to this email directly or view it on GitHubhttps://github.com//pull/836#issuecomment-39194124
.

If we keep uppermost in our minds the unkind and unjust acts of others, we
shall find it impossible to love them as Christ has loved us; but if our
thoughts dwell upon the wondrous love and pity of Christ for us, the same
spirit will flow out to others.

@ShubhamRai ShubhamRai deleted the TRUNK-3779 branch April 3, 2014 13:32
@ShubhamRai
Copy link
Contributor Author

I have added a new pull request addressing issues discussed above.
#847

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