Skip to content

Commit

Permalink
Merge pull request #521 from rokwire/release/v2.9.12+912
Browse files Browse the repository at this point in the history
Release/v2.9.12+912
  • Loading branch information
sandeep-ps authored Feb 11, 2021
2 parents 68cf601 + d9cc639 commit 25dd505
Show file tree
Hide file tree
Showing 16 changed files with 104 additions and 66 deletions.
32 changes: 29 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [2.9.7] - 2021-1-26
## [2.9.12] - 2021-02-09
### Changed
- Increased connectivity plugin version [#519](https://github.com/rokwire/safer-illinois-app/issues/519).

## [2.9.11] - 2021-02-08
### Changed
- Do not edit straightly roles from user data [#229](https://github.com/rokwire/illinois-app/issues/229).

### Fixed
- Fixed Counseling Center url [#512](https://github.com/rokwire/safer-illinois-app/issues/512).

## [2.9.10] - 2021-02-05
### Fixed
- Additional fix for refresh token and logout on 400, 401 or 403 erresponse code. [#508](https://github.com/rokwire/safer-illinois-app/issues/508)

## [2.9.9] - 2021-02-03
### Fixed
- Additional fix for refresh token and logout on 401 or 403 erresponse code. [#508](https://github.com/rokwire/safer-illinois-app/issues/508)

## [2.9.8] - 2021-02-01
### Fixed
- Explore Shibboleth login failure due to deleted UUID [#508](https://github.com/rokwire/safer-illinois-app/issues/508)
- Updated details of background permissions [#506](https://github.com/rokwire/safer-illinois-app/issues/506)
- Updated details of background permissions Explore Shibboleth login failure due to deleted UUID [#508](https://github.com/rokwire/safer-illinois-app/issues/508)

## [2.9.7] - 2021-01-26
### Fixed
- Updated order of panel shown during onboarding [#503](https://github.com/rokwire/safer-illinois-app/issues/503)
- Apply nextStepDate in local time when making the calculations for displayNextStepDate.

## [2.9.6] - 2021-1-22
## [2.9.6] - 2021-01-22
### Fixed
- Updated Onboarding Disclosure Panel text. [#497](https://github.com/rokwire/safer-illinois-app/issues/497)

## [2.9.5] - 2021-1-20
## [2.9.5] - 2021-01-20
### Changed
- Sync health.rules.json with latest 2.9 content on production
- Acknowledged "quarantine-on.reason" string entry in "health.rules.json".
Expand Down
6 changes: 3 additions & 3 deletions assets/strings.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

"panel.onboarding.location.label.title": "Turn on Location Services",
"panel.onboarding.location.label.title.hint": "Header 1",
"panel.onboarding.location.label.description": "Required for exposure notifications to work on your phone",
"panel.onboarding.location.label.description": "Background location is required for Bluetooth-based exposure notification to work on your phone",
"panel.onboarding.location.button.allow.title": "Enable Location Services",
"panel.onboarding.location.button.allow.hint": "",
"panel.onboarding.location.button.dont_allow.title": "Not right now",
Expand Down Expand Up @@ -415,7 +415,7 @@
"panel.health.onboarding.covid19.disclosure.label.content2": "2. Photos to allow a user to import their personal encryption key (QR code) into the app.",
"panel.health.onboarding.covid19.disclosure.label.content3": "3. Videos to allow a user to import their personal encryption key (QR code) into the app.",
"panel.health.onboarding.covid19.disclosure.label.content4": "4. Files (external storage read and write) to allow a user to import their personal encryption key (QR code) into the app.",
"panel.health.onboarding.covid19.disclosure.label.content5": "5. Location services on your device must be turned on to activate the Bluetooth low energy technology necessary for the exposure notification function of the Application. However, the Application does not access, collect, or store any location data, including GPS data. If location services on your device are turned off, the Application will perform the limited functions of storing and providing information about COVID-19 test results, any voluntarily reported symptoms, and building access status.",
"panel.health.onboarding.covid19.disclosure.label.content5": "5. Location services on your device must be turned on to activate the Bluetooth low energy technology necessary for the exposure notification function of the Application to work in the background. However, the Application does not access, collect, or store any location data, including GPS data. If location services on your device are turned off, the Application will perform the limited functions of storing and providing information about COVID-19 test results, any voluntarily reported symptoms, and building access status.",
"panel.health.onboarding.covid19.disclosure.label.description2": "YOUR INFORMATION AND HOW WE USE IT",
"panel.health.onboarding.covid19.disclosure.label.description3": "Information we need to provide you COVID-19 test results",
"panel.health.onboarding.covid19.disclosure.label.content8": "Name, email address, University ID number (UIN), phone number, and student registration information",
Expand All @@ -429,7 +429,7 @@
"panel.health.onboarding.covid19.disclosure.label.content13": " - WRITE_EXTERNAL_STORAGE",
"panel.health.onboarding.covid19.disclosure.label.content14": " - READ_EXTERNAL_STORAGE",
"panel.health.onboarding.covid19.disclosure.label.description8": "Opt-in exposure notification participation",
"panel.health.onboarding.covid19.disclosure.label.content18": "Your phone transmits and receives anonymous identifying numbers via Bluetooth. This identifier is stored on any phones that come close to you. If someone tests positive for COVID-19, their phone tells our servers the anonymous numbers they have sent for the last 14 days. Your phone will check if you were near that infected users' phone long enough to warrant an exposure notification. This is all done anonymously. Your location is never tracked or stored on our servers. The following permissions are used to enable this:",
"panel.health.onboarding.covid19.disclosure.label.content18": "Your phone transmits and receives anonymous identifying numbers via Bluetooth. This identifier is stored on any phones that come close to you. If someone tests positive for COVID-19, their phone tells our servers the anonymous numbers they have sent for the last 14 days. Your phone will check if you were near that infected users' phone long enough to warrant an exposure notification. This is all done anonymously. Your location is never tracked or stored on our servers. If you have elected to use Exposure Notification, Location Services, and Bluetooth, these capabilities will run in the background when the app is not in use. The following permissions are used to enable this:",
"panel.health.onboarding.covid19.disclosure.label.content19": " - BLUETOOTH",
"panel.health.onboarding.covid19.disclosure.label.content20": " - BLUETOOTH_ADMIN",
"panel.health.onboarding.covid19.disclosure.label.content21": " - LOCATION",
Expand Down
6 changes: 3 additions & 3 deletions assets/strings.es.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

"panel.onboarding.location.label.title": "Activar los servicios de ubicación",
"panel.onboarding.location.label.hint": "Encabezado 1",
"panel.onboarding.location.label.description": "Se requiere para que las notificaciones de exposición funcionen en su teléfono",
"panel.onboarding.location.label.description": "Se requiere una ubicación en segundo plano para que la notificación de exposición basada en Bluetooth funcione en su teléfono ",
"panel.onboarding.location.button.allow.title": "Servicio de localización activado",
"panel.onboarding.location.button.allow.hint": "",
"panel.onboarding.location.button.dont_allow.title": "No en este momento",
Expand Down Expand Up @@ -414,7 +414,7 @@
"panel.health.onboarding.covid19.disclosure.label.content2": "2. Photos to allow a user to import their personal encryption key (QR code) into the app.",
"panel.health.onboarding.covid19.disclosure.label.content3": "3. Videos to allow a user to import their personal encryption key (QR code) into the app.",
"panel.health.onboarding.covid19.disclosure.label.content4": "4. Files (external storage read and write) to allow a user to import their personal encryption key (QR code) into the app.",
"panel.health.onboarding.covid19.disclosure.label.content5": "5. Location services on your device must be turned on to activate the Bluetooth low energy technology necessary for the exposure notification function of the Application. However, the Application does not access, collect, or store any location data, including GPS data. If location services on your device are turned off, the Application will perform the limited functions of storing and providing information about COVID-19 test results, any voluntarily reported symptoms, and building access status.",
"panel.health.onboarding.covid19.disclosure.label.content5": "5. Location services on your device must be turned on to activate the Bluetooth low energy technology necessary for the exposure notification function of the Application to work in the background. However, the Application does not access, collect, or store any location data, including GPS data. If location services on your device are turned off, the Application will perform the limited functions of storing and providing information about COVID-19 test results, any voluntarily reported symptoms, and building access status.",
"panel.health.onboarding.covid19.disclosure.label.description2": "YOUR INFORMATION AND HOW WE USE IT",
"panel.health.onboarding.covid19.disclosure.label.description3": "Information we need to provide you COVID-19 test results",
"panel.health.onboarding.covid19.disclosure.label.content8": "Name, email address, University ID number (UIN), phone number, and student registration information",
Expand All @@ -428,7 +428,7 @@
"panel.health.onboarding.covid19.disclosure.label.content13": " - WRITE_EXTERNAL_STORAGE",
"panel.health.onboarding.covid19.disclosure.label.content14": " - READ_EXTERNAL_STORAGE",
"panel.health.onboarding.covid19.disclosure.label.description8": "Opt-in exposure notification participation",
"panel.health.onboarding.covid19.disclosure.label.content18": "Your phone transmits and receives anonymous identifying numbers via Bluetooth. This identifier is stored on any phones that come close to you. If someone tests positive for COVID-19, their phone tells our servers the anonymous numbers they have sent for the last 14 days. Your phone will check if you were near that infected users' phone long enough to warrant an exposure notification. This is all done anonymously. Your location is never tracked or stored on our servers. The following permissions are used to enable this:",
"panel.health.onboarding.covid19.disclosure.label.content18": "Your phone transmits and receives anonymous identifying numbers via Bluetooth. This identifier is stored on any phones that come close to you. If someone tests positive for COVID-19, their phone tells our servers the anonymous numbers they have sent for the last 14 days. Your phone will check if you were near that infected users' phone long enough to warrant an exposure notification. This is all done anonymously. Your location is never tracked or stored on our servers. If you have elected to use Exposure Notification, Location Services, and Bluetooth, these capabilities will run in the background when the app is not in use. The following permissions are used to enable this:",
"panel.health.onboarding.covid19.disclosure.label.content19": " - BLUETOOTH",
"panel.health.onboarding.covid19.disclosure.label.content20": " - BLUETOOTH_ADMIN",
"panel.health.onboarding.covid19.disclosure.label.content21": " - LOCATION",
Expand Down
6 changes: 3 additions & 3 deletions assets/strings.zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

"panel.onboarding.location.label.title": "打开位置服务",
"panel.onboarding.location.label.title.hint": "标题1",
"panel.onboarding.location.label.description": "曝光通知在手機上正常工作所必需",
"panel.onboarding.location.label.description": "要在手機上使用基於藍牙的曝光通知,需要背景位置",
"panel.onboarding.location.button.allow.title": "啟用位置服務",
"panel.onboarding.location.button.allow.hint": "",
"panel.onboarding.location.button.dont_allow.title": "暂时不",
Expand Down Expand Up @@ -414,7 +414,7 @@
"panel.health.onboarding.covid19.disclosure.label.content2": "2. Photos to allow a user to import their personal encryption key (QR code) into the app.",
"panel.health.onboarding.covid19.disclosure.label.content3": "3. Videos to allow a user to import their personal encryption key (QR code) into the app.",
"panel.health.onboarding.covid19.disclosure.label.content4": "4. Files (external storage read and write) to allow a user to import their personal encryption key (QR code) into the app.",
"panel.health.onboarding.covid19.disclosure.label.content5": "5. Location services on your device must be turned on to activate the Bluetooth low energy technology necessary for the exposure notification function of the Application. However, the Application does not access, collect, or store any location data, including GPS data. If location services on your device are turned off, the Application will perform the limited functions of storing and providing information about COVID-19 test results, any voluntarily reported symptoms, and building access status.",
"panel.health.onboarding.covid19.disclosure.label.content5": "5. Location services on your device must be turned on to activate the Bluetooth low energy technology necessary for the exposure notification function of the Application to work in the background. However, the Application does not access, collect, or store any location data, including GPS data. If location services on your device are turned off, the Application will perform the limited functions of storing and providing information about COVID-19 test results, any voluntarily reported symptoms, and building access status.",
"panel.health.onboarding.covid19.disclosure.label.description2": "YOUR INFORMATION AND HOW WE USE IT",
"panel.health.onboarding.covid19.disclosure.label.description3": "Information we need to provide you COVID-19 test results",
"panel.health.onboarding.covid19.disclosure.label.content8": "Name, email address, University ID number (UIN), phone number, and student registration information",
Expand All @@ -428,7 +428,7 @@
"panel.health.onboarding.covid19.disclosure.label.content13": " - WRITE_EXTERNAL_STORAGE",
"panel.health.onboarding.covid19.disclosure.label.content14": " - READ_EXTERNAL_STORAGE",
"panel.health.onboarding.covid19.disclosure.label.description8": "Opt-in exposure notification participation",
"panel.health.onboarding.covid19.disclosure.label.content18": "Your phone transmits and receives anonymous identifying numbers via Bluetooth. This identifier is stored on any phones that come close to you. If someone tests positive for COVID-19, their phone tells our servers the anonymous numbers they have sent for the last 14 days. Your phone will check if you were near that infected users' phone long enough to warrant an exposure notification. This is all done anonymously. Your location is never tracked or stored on our servers. The following permissions are used to enable this:",
"panel.health.onboarding.covid19.disclosure.label.content18": "Your phone transmits and receives anonymous identifying numbers via Bluetooth. This identifier is stored on any phones that come close to you. If someone tests positive for COVID-19, their phone tells our servers the anonymous numbers they have sent for the last 14 days. Your phone will check if you were near that infected users' phone long enough to warrant an exposure notification. This is all done anonymously. Your location is never tracked or stored on our servers. If you have elected to use Exposure Notification, Location Services, and Bluetooth, these capabilities will run in the background when the app is not in use. The following permissions are used to enable this:",
"panel.health.onboarding.covid19.disclosure.label.content19": " - BLUETOOTH",
"panel.health.onboarding.covid19.disclosure.label.content20": " - BLUETOOTH_ADMIN",
"panel.health.onboarding.covid19.disclosure.label.content21": " - LOCATION",
Expand Down
43 changes: 23 additions & 20 deletions lib/service/Auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -605,17 +605,21 @@ class Auth with Service implements NotificationsListener {
return null;
}

Future<void> deleteUserPiiData() async {
Future<bool> deleteUserPiiData() async {
if (Config().userProfileUrl != null) {
String url = '${Config().userProfileUrl}/pii/${Storage().userPid}';

await Network().delete(url,
headers: {'Content-Type':'application/json'},
auth: NetworkAuth.User
).whenComplete((){
_applyUserPiiData(null, null);
});
try {
Response response = await Network().delete(url, headers: {'Content-Type': 'application/json'}, auth: NetworkAuth.User);
if(response?.statusCode == 200) {
_applyUserPiiData(null, null);
return true;
}
} catch(error){
Log.e(error);
}
}
return false;
}

void _applyUserPiiData(UserPiiData userPiiData, String userPiiDataString, [bool notify = true]) {
Expand Down Expand Up @@ -837,23 +841,22 @@ class Auth with Service implements NotificationsListener {
.then((tokenResponse) {
_refreshTokenFuture = null;
try {
String tokenResponseBody = ((tokenResponse != null) && (tokenResponse.statusCode == 200)) ? tokenResponse.body : null;
var bodyMap = (tokenResponseBody != null) ? AppJson.decode(tokenResponseBody) : null;
_authToken = ShibbolethToken.fromJson(bodyMap);
_saveAuthToken();
if (authToken?.idToken == null) { // Why we need this if ?
_authInfo = null;
_saveAuthInfo();
_clearAuthCard();
_notifyAuthCardChanged();
_notifyAuthInfoChanged();
if((tokenResponse?.body != null) && (tokenResponse.statusCode == 200)){
String tokenResponseBody = tokenResponse.body;
var bodyMap = (tokenResponseBody != null) ? AppJson.decode(tokenResponseBody) : null;
_authToken = ShibbolethToken.fromJson(bodyMap);
if(authToken?.idToken != null) {
Log.d("Auth: did refresh token: ${authToken?.idToken}");
_saveAuthToken();
_notifyAuthTokenChanged();
}
}
else if(tokenResponse.statusCode == 400 || tokenResponse.statusCode == 401 || tokenResponse.statusCode == 403){
logout(); // Logout only on 400, 401 or 403. Do not do anything else for the rest of scenarios
}
Log.d("Auth: did refresh token: ${authToken?.idToken}");
_notifyAuthTokenChanged();
}
catch(e) {
print(e.toString());
logout();
}

return;
Expand Down
33 changes: 18 additions & 15 deletions lib/service/User.dart
Original file line number Diff line number Diff line change
Expand Up @@ -208,22 +208,25 @@ class User with Service implements NotificationsListener {
Future<void> deleteUser() async{
String userUuid = _userData?.uuid;
if((Config().userProfileUrl != null) && (userUuid != null)) {
await Network().delete("${Config().userProfileUrl}/$userUuid", headers: {"Accept": "application/json", "content-type": "application/json"}, auth: NetworkAuth.App);

_clearStoredUserData();
_notifyUserDeleted();

try {
_userData = await requestUser(Storage().localUserUuid);
} on UserNotFoundException catch (_) {
_userData = await _requestCreateUser();
if (_userData?.uuid != null) {
Storage().localUserUuid = _userData?.uuid;
}
await Network().delete("${Config().userProfileUrl}/$userUuid", headers: {"Accept": "application/json", "content-type": "application/json"}, auth: NetworkAuth.App);
}
if (_userData != null) {
Storage().userData = _userData;
_notifyUserUpdated();
finally {
_clearStoredUserData();
_notifyUserDeleted();

try {
_userData = await requestUser(Storage().localUserUuid);
} on UserNotFoundException catch (_) {
_userData = await _requestCreateUser();
if (_userData?.uuid != null) {
Storage().localUserUuid = _userData?.uuid;
}
}
if (_userData != null) {
Storage().userData = _userData;
_notifyUserUpdated();
}
}
}

Expand Down Expand Up @@ -286,7 +289,7 @@ class User with Service implements NotificationsListener {

set roles(Set<UserRole> userRoles) {
if (_userData != null) {
_userData.roles = userRoles;
_userData.roles = (userRoles != null) ? Set.from(userRoles) : null;
_updateUser().then((_){
_notifyUserRolesUpdated();
});
Expand Down
Loading

0 comments on commit 25dd505

Please sign in to comment.