Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16538c1d authored by Fahim Salam Chowdhury's avatar Fahim Salam Chowdhury 👽
Browse files

Merge branch '2497-Remove_extra_scopes_for_murena_oidc' into 6287-Enable_murena_OIDC_support

parents a7f5f622 e6594260
Loading
Loading
Loading
Loading
Loading
+16 −18
Original line number Diff line number Diff line
@@ -4,13 +4,13 @@ variables:
  PROJECT_ID: "83" # under Settings -> General
  APK_PATH: "app/build/outputs/apk/ose/release"
  UNSIGNED_APK: "davx5-ose-release-unsigned.apk"
  DEV_APK: "Account-manager-dev.apk"
  STABLE_APK: "Account-manager-stable.apk"
  COMMUNITY_APK: "Account_manager_community.apk"
  OFFICIAL_APK: "Account_manager_official.apk"

stages:
  - update-from-upstream
  - build
  - release
  - gitlab_release

before_script:
  - echo email.key=$PEPPER >> local.properties
@@ -48,20 +48,18 @@ build:
      - app/build/outputs/apk/ose/

init_submodules:
  stage: release
  stage: gitlab_release
  rules:
    - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"'
      when: on_success
  script:
    - |
      git submodule add --force \
      https://gitlab.e.foundation/e/os/system-apps-update-info.git systemAppsUpdateInfo
    - git clone https://gitlab.e.foundation/e/os/system-apps-update-info.git systemAppsUpdateInfo
  artifacts:
    paths:
      - systemAppsUpdateInfo/
      - systemAppsUpdateInfo/scripts/

generate-apks:
  stage: release
  stage: gitlab_release
  rules:
    - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"'
      when: on_success
@@ -76,15 +74,15 @@ generate-apks:
  script:
    - |
      ./systemAppsUpdateInfo/scripts/generate-apks.sh \
      "$APK_PATH" "$UNSIGNED_APK" "$DEV_APK" "$STABLE_APK"
      "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK"
  artifacts:
    paths:
      - $APK_PATH/$UNSIGNED_APK
      - $APK_PATH/$DEV_APK
      - $APK_PATH/$STABLE_APK
      - $APK_PATH/$COMMUNITY_APK
      - $APK_PATH/$OFFICIAL_APK

create-json-files:
  stage: release
  stage: gitlab_release
  dependencies:
    - init_submodules
    - generate-apks
@@ -99,14 +97,14 @@ create-json-files:
  script:
    - |
      ./systemAppsUpdateInfo/scripts/create-json-files.sh \
      "$APK_PATH" "$UNSIGNED_APK" "$DEV_APK" "$STABLE_APK"
      "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK"
  artifacts:
    paths:
      - dev.json
      - stable.json
      - community.json
      - official.json

create-release:
  stage: release
  stage: gitlab_release
  dependencies:
    - init_submodules
  needs:
@@ -121,7 +119,7 @@ create-release:
  script:
    - |
      ./systemAppsUpdateInfo/scripts/create-release.sh \
      "$APK_PATH" "$UNSIGNED_APK" "$DEV_APK" "$STABLE_APK"
      "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK"

.update-from-upstream:
  stage: update-from-upstream
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ android {
    defaultConfig {
        applicationId "foundation.e.accountmanager"

        versionCode 403090003
        versionCode 403090004
        versionName '4.3.9'

        buildConfigField "long", "buildTime", System.currentTimeMillis() + "L"
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ enum class IdentityProvider(
        clientSecret = null,
        redirectUri = BuildConfig.MURENA_REDIRECT_URI + ":/redirect",
        logoutRedirectUri = BuildConfig.MURENA_LOGOUT_REDIRECT_URI + ":/redirect",
        scope = "openid address profile email phone roles offline_access web-origins microprofile-jwt",
        scope = "openid profile email",
        userInfoEndpoint = null,
        baseUrl = BuildConfig.MURENA_BASE_URL,
    ),
+12 −6
Original line number Diff line number Diff line
@@ -898,15 +898,21 @@ abstract class SyncManager<ResourceType: LocalResource<*>, out CollectionType: L
        val contentIntent: Intent
        var viewItemAction: NotificationCompat.Action? = null

	    if (account.type in AccountUtils.getMainAccountTypes(context)

        if (
            (account.type in AccountUtils.getMainAccountTypes(context)
                    || account.type ==  context.getString(R.string.account_type_eelo_address_book))
            && (e is UnauthorizedException || e is NotFoundException)) {

            contentIntent = Intent(context, SettingsActivity::class.java)
            contentIntent.putExtra(SettingsActivity.EXTRA_ACCOUNT,
                    if (authority == ContactsContract.AUTHORITY)

            val contentAccount = if (authority == ContactsContract.AUTHORITY) {
                mainAccount
                    else
                        account)
            } else {
                account
            }
            contentIntent.putExtra(SettingsActivity.EXTRA_ACCOUNT, contentAccount)

        } else {
            contentIntent = buildDebugInfoIntent(e, local, remote)
            if (local != null)