Skip to content

Commit

Permalink
Merge pull request #413 from OpenSRP/update_core_version_to_4.2.16
Browse files Browse the repository at this point in the history
Fix P2P authentication and offline login
  • Loading branch information
rkodev authored Mar 23, 2021
2 parents 4fe1358 + 2c36bfe commit 275692b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=2.0.24-SNAPSHOT
VERSION_NAME=2.0.25-SNAPSHOT
VERSION_CODE=1
GROUP=org.smartregister
POM_SETTING_DESCRIPTION=OpenSRP Client Chw Core Library
Expand Down
2 changes: 1 addition & 1 deletion opensrp-chw-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ dependencies {

compileOnly 'com.ibm.fhir:fhir-model:4.2.3'

api('org.smartregister:opensrp-client-core:4.2.5-SNAPSHOT@aar') {
api('org.smartregister:opensrp-client-core:4.2.16-SNAPSHOT@aar') {
transitive = true
exclude group: 'com.github.bmelnychuk', module: 'atv'
exclude group: 'com.google.guava', module: 'guava'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import org.apache.commons.lang3.StringUtils;
import org.smartregister.AllConstants;
import org.smartregister.CoreLibrary;
import org.smartregister.chw.core.utils.CoreConstants;
Expand Down Expand Up @@ -135,7 +136,9 @@ public void getAuthorizationDetails(@NonNull OnAuthorizationDetailsProvidedCallb
AllSharedPreferences allSharedPreferences = CoreLibrary.getInstance().context().allSharedPreferences();

authorizationDetails.put(AllConstants.PeerToPeer.KEY_TEAM_ID, allSharedPreferences.fetchDefaultTeamId(allSharedPreferences.fetchRegisteredANM()));
authorizationDetails.put(CoreConstants.PEER_TO_PEER.LOCATION_ID, allSharedPreferences.fetchUserLocalityId(allSharedPreferences.fetchRegisteredANM()));
String locationId = allSharedPreferences.fetchDefaultLocalityId(allSharedPreferences.fetchRegisteredANM());
if(StringUtils.isBlank(locationId)) locationId = allSharedPreferences.fetchUserLocalityId(allSharedPreferences.fetchRegisteredANM());
authorizationDetails.put(CoreConstants.PEER_TO_PEER.LOCATION_ID, locationId);

onAuthorizationDetailsProvidedCallback.onAuthorizationDetailsProvided(authorizationDetails);
}
Expand Down

0 comments on commit 275692b

Please sign in to comment.