Skip to content

fix: incompatible AMPF with latest Nextcloud patches#1097

Merged
saw-jan merged 5 commits into
release/2.11from
fix/incompatible-ampf
Jul 8, 2026
Merged

fix: incompatible AMPF with latest Nextcloud patches#1097
saw-jan merged 5 commits into
release/2.11from
fix/incompatible-ampf

Conversation

@saw-jan

@saw-jan saw-jan commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Description

Listen for UserLoggedInEvent event and set last-password-confirm session state if the requesting user is OpenProject and using app password

Related Issue or Workpackage

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Updated CHANGELOG.md file

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
@saw-jan saw-jan self-assigned this Jul 7, 2026
@saw-jan saw-jan changed the title fix: incompatible AMPF with latest Nextclodu patches fix: incompatible AMPF with latest Nextcloud patches Jul 7, 2026
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
@saw-jan saw-jan requested a review from Copilot July 7, 2026 11:52
Comment thread lib/Listener/UserLoggedInEventListener.php Outdated
Comment thread lib/Listener/UserLoggedInEventListener.php Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds a Nextcloud event listener to work around recent server changes by updating the session’s password-confirmation timestamp when the OpenProject system user logs in via an app password/token flow.

Changes:

  • Introduces UserLoggedInEventListener to set last-password-confirm for OpenProject token logins
  • Registers the listener in the app boot sequence
  • Documents the fix in CHANGELOG.md

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
lib/Listener/UserLoggedInEventListener.php New listener that updates session state on UserLoggedInEvent for token login
lib/AppInfo/Application.php Wires the new listener into the event dispatcher during boot
CHANGELOG.md Adds an entry describing the compatibility fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/Listener/UserLoggedInEventListener.php
Comment thread lib/Listener/UserLoggedInEventListener.php Outdated
Comment thread lib/Listener/UserLoggedInEventListener.php
Comment thread lib/Listener/UserLoggedInEventListener.php
Comment thread lib/Listener/UserLoggedInEventListener.php Outdated
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
@saw-jan saw-jan force-pushed the fix/incompatible-ampf branch from 465f104 to 2580825 Compare July 7, 2026 12:18

@come-nc come-nc left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good apart from registration being done in boot.

Comment thread lib/AppInfo/Application.php Outdated
@saw-jan

saw-jan commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

Tests confirmed the fix

Error:  Unexpected passed scenarios:
  - Scenario: check OpenProjectNoAutomaticProjectFolders group after user is removed from OpenProject group (removed by group admin) (tests/acceptance/features/api/teamFolder.feature:54)
  - Scenario: user not in OpenProject group is removed from another group (removed by group admin) (tests/acceptance/features/api/teamFolder.feature:63)
  - Scenario: user not in OpenProject group but has multiple group memberships is removed from one group (removed by group admin) (tests/acceptance/features/api/teamFolder.feature:78)
  - Scenario: user in OpenProject and other groups (removed by group admin) (tests/acceptance/features/api/teamFolder.feature:98)
  - Scenario: multiple user in OpenProject groups and only one gets removed (removed by group admin) (tests/acceptance/features/api/teamFolder.feature:122)
  - Scenario: user is in multiple groups including OpenProject and is removed from another group (removed by group admin) (tests/acceptance/features/api/teamFolder.feature:141)

saw-jan added 2 commits July 8, 2026 10:27
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

JS Code Coverage

Coverage after merging fix/incompatible-ampf into release/2.11 will be
91.28%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   adminSettings.js0%0%0%0%1, 1, 10–19, 2–9
   bootstrap.js0%0%0%0%1, 1, 10–12, 2–9
   dashboard.js0%0%0%0%1, 1, 10–19, 2–9
   fileActions.js0%0%0%0%1, 1, 10–19, 2, 20–23, 3–9
   personalSettings.js0%0%0%0%1, 1, 10–19, 2–9
   projectTab.js0%0%0%0%1, 1, 10–19, 2, 20–29, 3, 30–39, 4, 40–49, 5, 50, 6–9
   reference.js0%0%0%0%1, 1, 10–19, 2, 20–29, 3, 30–39, 4, 40–45, 5–9
   utils.js85.92%33.33%50%87.59%12–20, 23–32
src/api
   endpoints.js100%100%100%100%
   settings.js59.09%100%0%68.42%10–11, 14–15, 18–19
src/components
   AdminSettings.vue96.05%94.26%96.08%96.31%448–453, 456–461, 527–528, 532–533, 536–537, 541–542, 552–557, 588–590, 609–611, 691–693, 727–729
   ErrorLabel.vue100%100%100%100%
   OAuthConnectButton.vue85.82%63.64%100%87.39%49–56, 64–69, 72–76
   PersonalSettings.vue92.02%95.65%90%91.71%133–134, 144–149, 152–161
src/components/admin
   FieldValue.vue100%100%100%100%
   FormAuthMethod.vue98.12%96.88%100%98.12%222–224, 247–250
   FormHeading.vue100%100%100%100%
   FormOAuthSettings.vue97.61%96.15%93.10%98.10%217, 248, 338, 360, 378–380, 402–404
   FormOpenProjectHost.vue98.87%94.74%100%99.34%167–169, 279
   FormSSOSettings.vue98.57%97.18%96.55%98.91%231–233, 242–243, 358–359
   TermsOfServiceUnsigned.vue100%100%100%100%
   TextInput.vue100%100%100%100%
src/components/icons
   ClippyIcon.vue100%100%100%100%
   OpenProjectIcon.vue100%100%100%100%
src/components/settings
   CheckBox.vue100%100%100%100%
   ErrorNote.vue100%100%100%100%
   SettingsTitle.vue96.91%85.71%100%97.67%51–53
src/components/tab
   EmptyContent.vue96.45%80.95%100%98.24%102–105, 107–108, 97
   SearchInput.vue95.31%92.96%94.74%95.78%138–139, 192, 203–208, 267–269, 285–287, 291–296
   WorkPackage.vue86.22%73.17%93.33%87.58%106–115, 128–130, 141–145, 155–157, 175–181, 219, 219–224, 224, 224–235, 80–81
src/constants
   appID.js100%100%100%100%
   links.js100%100%100%100%
   messages.js100%100%100%100%
src/filesPlugin
   filesPlugin.js0%0%0%0%1, 1, 10, 100, 11–19, 2, 20–29, 3, 30–39, 4, 40–49, 5, 50–59, 6, 60–69, 7, 70–79, 8, 80–89, 9, 90–99
   filesPluginLessThan28.js0%0%0%0%1, 1, 10–19, 2, 20–29, 3, 30–39, 4, 40–49, 5, 50–59, 6, 60–69, 7, 70, 8–9
src/utils
   workpackageHelper.js93.85%93.33%88.89%94.24%100–102, 156–157, 23–25, 54, 54–56, 97–99
src/views
   CreateWorkPackageModal.vue94.18%86.32%90.48%95.43%367–372, 375, 391, 508–511, 516–521, 526–531, 537–540, 543, 559, 559, 600–604, 614–616, 639–640, 648–650, 679–681, 703–705, 714–718
   Dashboard.vue92.96%92.86%82.61%93.77%120–125, 134, 144, 147, 158–160, 214–217, 220–221, 228–232, 67
   LinkMultipleFilesModal.vue99.14%97.56%100%99.32%157–159
   ProjectsTab.vue94.06%92.45%93.33%94.33%100–101, 107–109, 129, 140–141, 175–185, 234–236, 98–99

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

PHP Code Coverage

Coverage after merging fix/incompatible-ampf into release/2.11 will be
68.16%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
integration_openproject/server/apps/integration_openproject/lib
   Capabilities.php0%100%0%0%24, 31–40
   OIDCClientMapper.php0%100%0%0%29, 40–49, 52
   TokenEventFactory.php100%100%100%100%
integration_openproject/server/apps/integration_openproject/lib/AppInfo
   Application.php37.04%100%50%36%116–118, 121–135, 138, 140, 142–143, 146, 151–152, 156–159, 161–172, 174, 177, 181, 185–187, 220
integration_openproject/server/apps/integration_openproject/lib/BackgroundJob
   RemoveExpiredDirectUploadTokens.php0%100%0%0%28, 30–32, 41–42
integration_openproject/server/apps/integration_openproject/lib/Controller
   ConfigController.php79.01%100%70.59%79.36%114, 151–152, 154, 156–158, 160–163, 166–167, 169, 194, 198–200, 442–444, 446–448, 497, 577–581, 592, 606–609, 617, 621–624, 663, 669–684, 719, 722, 725–740, 754–757, 759–763
   DirectDownloadController.php0%100%0%0%33–35, 50–52, 54–61
   DirectUploadController.php71.03%100%100%70.21%117–119, 162–164, 175, 179–182, 184, 194, 201, 217–219, 221–222, 225–230, 233, 235, 245–247, 253–255, 263–265, 280–282, 301, 306, 312
   FilesController.php86.99%100%83.33%87.18%178–179, 241, 250, 267–270, 275–277, 282–284, 293
   OpenProjectAPIController.php81.09%100%82.35%80.98%116, 155, 202–204, 207–214, 216–220, 222, 241, 266, 331, 381, 401, 448, 473–475, 478–482, 484, 66
   OpenProjectController.php96.45%100%80%96.95%241–245
integration_openproject/server/apps/integration_openproject/lib/Dashboard
   OpenProjectWidget.php0%100%0%0%101, 108–109, 111–116, 118–122, 124–126, 129–140, 61–66, 73, 80, 87, 94
integration_openproject/server/apps/integration_openproject/lib/Exception
   OpenprojectAvatarErrorException.php100%100%100%100%
   OpenprojectErrorException.php100%100%100%100%
   OpenprojectFileNotUploadedException.php100%100%100%100%
   OpenprojectGroupfolderSetupConflictException.php100%100%100%100%
   OpenprojectResponseException.php100%100%100%100%
   OpenprojectUnauthorizedUserException.php0%100%0%0%21
integration_openproject/server/apps/integration_openproject/lib/Listener
   BeforeGroupDeletedListener.php100%100%100%100%
   BeforeNodeInsideOpenProjectGroupfilderChangedListener.php0%100%0%0%46–48, 52–55, 57, 59, 62–63, 65, 67–70, 72–75, 77–79
   BeforeUserDeletedListener.php60%100%100%50%38, 42–43, 45
   LoadAdditionalScriptsListener.php0%100%0%0%37–38, 46–47, 49, 51–52, 54
   LoadSidebarScript.php65.91%100%100%64.29%105, 77–88, 95, 98
   OpenProjectReferenceListener.php0%100%0%0%45–47, 54–55, 57, 59–60, 62–74
   TermsOfServiceEventListener.php0%100%0%0%41–42, 47–48, 50–51, 53–55, 58–62
   UserChangedListener.php0%100%0%0%34, 41–42, 45–50, 53
   UserLoggedInEventListener.php0%100%0%0%27, 35–36, 39, 42
integration_openproject/server/apps/integration_openproject/lib/Migration
   Version2001Date20221213083550.php0%100%0%0%30, 40–48, 50–58, 60–62, 64
   Version20100Date20250820101358.php0%100%0%0%38, 47–53, 56
   Version2310Date20230116153411.php0%100%0%0%29, 32–35, 37–62, 64–65, 67
   Version2400Date20230504144300.php0%100%0%0%30, 40–43
   Version2640Date20240628114301.php0%100%0%0%35, 47–49, 52–53, 56
   Version2900Date20250718065820.php0%100%0%0%22, 33–36, 38–39, 41–42, 45
integration_openproject/server/apps/integration_openproject/lib/Reference
   WorkPackageReferenceProvider.php51.67%100%25%58.33%100–101, 104, 108, 142, 150–151, 159, 37, 44, 51, 58–60, 87, 93–96, 99
integration_openproject/server/apps/integration_openproject/lib/Search
   OpenProjectSearchProvider.php0%100%0%0%100–102, 104–106, 109–110, 112–113, 116–125, 127–131, 52–55, 62, 69, 77, 79, 82, 89–90, 93–97, 99
   OpenProjectSearchResultEntry.php100%100%100%100%
integration_openproject/server/apps/integration_openproject/lib/Service
   DatabaseService.php42.31%100%60%40.43%108–112, 114, 63–76, 78–85
   DirectDownloadService.php88.46%100%100%87.50%62–63, 65
   DirectUploadService.php42.86%100%66.67%40%101, 62–65, 67–75, 95
   OauthService.php0%100%0%0%100–101, 40–42, 51–58, 60–66, 75–83, 94–99
   OpenProjectAPIService.php76.52%100%78.87%76.33%1005–1006, 1008, 1010–1011, 1034–1040,

Comment thread lib/AppInfo/Application.php

@nabim777 nabim777 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 👍🏻

@saw-jan saw-jan merged commit 7565291 into release/2.11 Jul 8, 2026
10 checks passed
@saw-jan saw-jan deleted the fix/incompatible-ampf branch July 8, 2026 08:22
saw-jan added a commit that referenced this pull request Jul 8, 2026
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
Ashim-Stha pushed a commit that referenced this pull request Jul 8, 2026
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
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.

6 participants