Skip to content

M0: managed configuration (MDM) - #10

Merged
tobiasKaminsky merged 5 commits into
mainfrom
m0/mdm
Dec 3, 2026
Merged

tobiasKaminsky merged 5 commits into
mainfrom
m0/mdm

Conversation

@tobiasKaminsky

Copy link
Copy Markdown
Member

Stacked on #9: review only the last commit until the earlier PRs are merged.

SPEC §5.1 (iOS §5.1.9). app_restrictions.xml: serverUrl, disableBackup, disableExternalSharing, disableScreenshots.

  • serverUrl: the login is pre-filled and started; other servers are refused, also for QR codes, links and SSO
  • disableScreenshots: FLAG_SECURE
  • Changes apply while the app runs
  • disableBackup and disableExternalSharing are read now and will be used by backup (M3) and sharing (M2)

Not yet tried with a real MDM (Test DPC).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Nb4eMg7ShMcjycNqaRBq3z

tobiasKaminsky and others added 4 commits December 3, 2026 10:26
As iOS §5.3 (SPEC §5.2): capabilities, then the Photos settings (companion
config API, else the web app's initial state, else defaults), then probes
for Photos DAV, places, Recognize, system tags, timeline days, unified search
and task processing, run in parallel through android-library's client.

Stored per account as JSON (ServerFeatures in core/model), detected at login
and at app start or account switch when older than an hour; failures keep
the previous result. The server theme colour now colours the app.

Tests: parsers against the photos-apple fixtures (stock master, Photos 8,
extended), repository refresh rules, and detection against Docker Nextcloud 33.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nb4eMg7ShMcjycNqaRBq3z
Signed-off-by: Tobias Kaminsky <tobias@nextcloud.com>
When the server rejects an account's login (401), the app checks for a
remote wipe (as iOS §5.1, SPEC §4.3). If one was requested, the account is
purged (AccountCleanup hooks, now incl. the per-account files and cache
folders, its Keystore key and DB row) and the wipe is confirmed to the
server; the user sees a notice. Otherwise the home screen offers "Log in
again" and "Remove account".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nb4eMg7ShMcjycNqaRBq3z
Signed-off-by: Tobias Kaminsky <tobias@nextcloud.com>
Accounts of the Nextcloud Files app can be used through Android-SingleSignOn
(SPEC §5.1). SsoInterceptor turns android-library's OkHttp requests into SSO
requests, so NextcloudClient (and later Coil and Media3) work the same for
SSO and own accounts. Multistatus methods answer 207, HTTP errors keep their
status, and an "unsupported method" from an old Files app becomes
FILES_APP_TOO_OLD.

The login screen offers "Use an account from the Nextcloud Files app" when
Files is installed. Signing in checks that the Files app forwards SEARCH
(nextcloud/android#18196); otherwise it asks to update the Files app.

Enables core library desugaring (required by Android-SingleSignOn).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nb4eMg7ShMcjycNqaRBq3z
Signed-off-by: Tobias Kaminsky <tobias@nextcloud.com>
- feature/settings: settings list (accounts, theme, server/device colours,
  server information with "Check again", export diagnostics, about), accounts
  screen (switch, add, remove with confirmation), about and open source
  licences (AboutLibraries)
- core/logging: app log to Logcat and a two-file ring buffer on disk; hosts
  are hashed, no file names or credentials (SPEC §4.5)
- Export diagnostics: zip with the log, server features per account (as
  "account 1", hashed host) and app/device versions, shared via FileProvider
- App settings in their own DataStore, the only file allowed into Android
  backup; theme and colour mode applied app-wide
- CI: the analysis wrapper now also runs testDebugUnitTest, so the unit tests
  of modules without screenshots run in CI too

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nb4eMg7ShMcjycNqaRBq3z
Signed-off-by: Tobias Kaminsky <tobias@nextcloud.com>
app_restrictions.xml with serverUrl, disableBackup, disableExternalSharing
and disableScreenshots (SPEC §5.1). A managed server pre-fills and starts the
login and other servers are refused (also for QR codes, links and SSO);
disableScreenshots sets FLAG_SECURE. Changes apply while the app runs.
disableBackup and disableExternalSharing are read now and used when backup
(M3) and sharing (M2) exist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nb4eMg7ShMcjycNqaRBq3z
Signed-off-by: Tobias Kaminsky <tobias@nextcloud.com>
@tobiasKaminsky
tobiasKaminsky merged commit 1545a43 into main Dec 3, 2026
5 checks passed
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit 66b4f9b
Version 10
Available until 7 days after this build

The QA build installs alongside a released Nextcloud app, so you can keep
using your existing install while testing.

Downloading the file requires a GitHub account, so open this link on the
device you want to test on, or transfer the APK to it.

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.

1 participant