openmrs-core icon indicating copy to clipboard operation
openmrs-core copied to clipboard

TRUNK-6066 Rename host.url global property

Open wikumChamith opened this issue 2 years ago • 0 comments

Description of what I changed

The host.url global property is inconsistent with usage in password reset API. This renames host.url to security.passwordResetUrl .

Issue I worked on

see https://issues.openmrs.org/browse/TRUNK-6066

I made the suggested changes proposed in the issue. BTW I am not sure from where a value gets set to OpenmrsConstants#GP_HOST_URL. Because its default value is "".

https://github.com/openmrs/openmrs-core/blob/f469f2c5d501ccb5032618ccbb6e53c007838aab/api/src/main/java/org/openmrs/util/OpenmrsConstants.java#L709

However in the test UserServiceTest#setUserActivationKey_shouldCreateUserActivationKey it is manually set to "http://localhost:8080/openmrs/admin/users/changePassword.form/{activationKey}".

https://github.com/openmrs/openmrs-core/blob/8486acd739bf92998e81c5c3ab078d51b4a11658/api/src/test/java/org/openmrs/api/UserServiceTest.java#L1528-L1535

Checklist: I completed these to help reviewers :)

  • [x] My IDE is configured to follow the code style of this project.

    No? Unsure? -> configure your IDE, format the code and add the changes with git add . && git commit --amend

  • [ ] I have added tests to cover my changes. (If you refactored existing code that was well tested you do not have to add tests)

    No? -> write tests and add them to this commit git add . && git commit --amend

  • [x] I ran mvn clean package right before creating this pull request and added all formatting changes to my commit.

    No? -> execute above command

  • [x] All new and existing tests passed.

    No? -> figure out why and add the fix to your commit. It is your responsibility to make sure your code works.

  • [x] My pull request is based on the latest changes of the master branch.

    No? Unsure? -> execute command git pull --rebase upstream master

wikumChamith avatar Aug 05 '22 15:08 wikumChamith