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-6203: Global properties access should be privileged #190

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

wikumChamith
Copy link
Member

@wikumChamith wikumChamith commented Mar 30, 2024

After TRUNK-6203, users must possess the 'Get Global Properties' privilege to access global properties. This addition and removal of the global property are necessary for accessing global properties before a user logs in.

Ticket: https://openmrs.atlassian.net/browse/TRUNK-6203

@wikumChamith
Copy link
Member Author

@dkayiwa I updated this PR. We also need this to run the reference application.

@dkayiwa
Copy link
Member

dkayiwa commented May 28, 2024

We also need this to run the reference application.

Yes we need to.

@wikumChamith
Copy link
Member Author

We also need this to run the reference application.

Yes we need to.

Strangely, it sometimes works without these changes 😅

@dkayiwa
Copy link
Member

dkayiwa commented May 28, 2024

Strangely, it sometimes works without these changes 😅

Not a good sign. 😊

@wikumChamith
Copy link
Member Author

wikumChamith commented May 28, 2024

Strangely, it sometimes works without these changes 😅

Not a good sign. 😊

That happened only once, it was probably an issue on my side.

@@ -81,8 +82,16 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
// look up the allowed # of attempts per IP
Integer allowedLockoutAttempts = 100;

String allowedLockoutAttemptsGP = Context.getAdministrationService().getGlobalProperty(
GP_ALLOWED_LOGIN_ATTEMPTS_PER_IP, "100");
String allowedLockoutAttemptsGP = "";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not initialise this with the default value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the PR.

@dkayiwa dkayiwa merged commit 16bab70 into openmrs:master Jun 3, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants