[LBAC-2] Assign users to the locations on registration Created: 2018-05-22  Updated: 2018-07-27  Resolved: 2018-07-27

Status: Closed
Project: Location Based Access Control
Component/s: None
Affects Version/s: None
Fix Version/s: 0.1.0

Type: Task Priority: Should
Reporter: Suthagar Kailayapathy Assignee: Suthagar Kailayapathy
Resolution: Fixed Votes: 0
Labels: gsoc2018
Remaining Estimate: 4 days
Time Spent: Not Specified
Original Estimate: 4 days

Attachments: Text File image-2018-07-23-17-03-45-578.png    
Complexity: Medium
Watchers:
Daniel Kayiwa, Suthagar Kailayapathy
Designated Committer: Suthagar Kailayapathy

 Description   

Location based access control system will require the default location parameter for every user to restrict the access based on the default locations. So We need to assign the default locations to the users while they are registering in the OpenMRS. 

Implementation Plan

Use the AOP techniques to save the default location to the users as a person attribute while they are registering the system.



 Comments   
Comment by Suthagar Kailayapathy [ 2018-07-20 ]

I have completed this ticket. Please review this PR : https://github.com/openmrs/openmrs-module-locationbasedaccess/pull/17

 

Comment by Daniel Kayiwa [ 2018-07-22 ]

I have put comments on github

Comment by Suthagar Kailayapathy [ 2018-07-23 ]

I have added fixes to the comments. Can you please review again?

Comment by Daniel Kayiwa [ 2018-07-23 ]

I have put more comments.

Comment by Suthagar Kailayapathy [ 2018-07-23 ]

I have localized the labels. Please review it again.

Comment by Daniel Kayiwa [ 2018-07-23 ]

I compiled both modules but did not see any visible change.

Comment by Suthagar Kailayapathy [ 2018-07-23 ]

localized the labels are just updated. You mean you are not getting any view like this? 

 

Comment by Daniel Kayiwa [ 2018-07-23 ]

Can we avoid displaying location as null like on this screen? https://modules-refapp.openmrs.org/openmrs/adminui/systemadmin/accounts/account.page?personId=1&

Comment by Daniel Kayiwa [ 2018-07-23 ]

Secondly, how do i edit to add a location to an existing user?

Comment by Suthagar Kailayapathy [ 2018-07-23 ]

I will remove the 'null' message from the display. You just need to click the edit button of the user account details to edit the location property as well.

Comment by Daniel Kayiwa [ 2018-07-23 ]

I tried the edit button. But the save button did not get enabled, after selecting a location.

Comment by Suthagar Kailayapathy [ 2018-07-23 ]

I think there might be missing some required fields. I tried it Daniel Kayiwa and I was able to edit the Location (Privilege Level also should be selected since it is a required field). But the user needs to refresh the page to get these changes into the dashboard. Because other user information (username, privilege) are updated through the Angular services, and we can't extend that to the custom fragments.

You can check it from here : https://modules-refapp.openmrs.org/openmrs

 

Comment by Daniel Kayiwa [ 2018-07-24 ]

I have put more comments on github

Comment by Suthagar Kailayapathy [ 2018-07-24 ]

I have addressed those comments Daniel Kayiwa . Please have a look again.

Comment by Daniel Kayiwa [ 2018-07-24 ]

More comments on github

Comment by Suthagar Kailayapathy [ 2018-07-24 ]

I have changed the extension Ids in the PR and Docs.

Comment by Daniel Kayiwa [ 2018-07-24 ]

Still more comments on github

Comment by Daniel Kayiwa [ 2018-07-24 ]

Merged at https://github.com/openmrs/openmrs-module-locationbasedaccess/commit/4faaa2ff2c217fcc2f42510cb6039f502ad3404c
Thanks Suthagar Kailayapathy

Comment by Suthagar Kailayapathy [ 2018-07-27 ]

Works need to move the userPropertyName to the Global Property.

Comment by Suthagar Kailayapathy [ 2018-07-27 ]

We couldn't add the value from Global property to extensions. So decided to re-close this issue.

Generated at Mon Dec 10 15:56:57 UTC 2018 using JIRA 7.5.1#75006-sha1:7df2574a6cc842da727f00de4c5ce9ac07701368.