Skip to content

feat(auth): let app passwords read files without changing them - #66137

Open
pringelmann wants to merge 4 commits into
feat/noid/app-password-app-grantsfrom
feat/noid/app-password-read-only
Open

pringelmann wants to merge 4 commits into
feat/noid/app-password-app-grantsfrom
feat/noid/app-password-read-only

Conversation

@pringelmann

Copy link
Copy Markdown
Contributor

Summary

App passwords can now be limited to reading files using the files:files:read scope.

A permissions mask on the key's mounts removes write rights. (the root mount is not masked, so previews still get generated.

The read methods in the files and sharing controllers now need only files:files:read. The classes stay on write, so new methods are closed by default.

Changes to the picker: a "Read-only files" preset and a "Can edit files" option under Files:

read-only-picker

Note

Read-only also means no PROPPATCH, so favorites and tags can't be changed with such a key. We can add this later if needed when actual clients can request scopes during login flow.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@pringelmann pringelmann added this to the Nextcloud 36 milestone Nov 2, 2026
@pringelmann pringelmann self-assigned this Nov 2, 2026
@pringelmann pringelmann added enhancement 3. to review Waiting for reviews labels Nov 2, 2026
@pringelmann
pringelmann added this pull request to stack #65341 November 2, 2026 10:02
@pringelmann
pringelmann requested review from a team as code owners November 2, 2026 10:02
export const AREAS = Object.keys(AREA_OPTIONS) as Area[]

/** Restoring writes into the files, so it only works with editing */
const NEEDS: Partial<Record<Grant, Grant>> = {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Temporary dependency map until we replace it with a ScopeProvider (comes after 36)

@pringelmann
pringelmann force-pushed the feat/noid/app-password-read-only branch from 2ddc997 to 181101d Compare November 2, 2026 10:37
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
…ad APIs

Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
passwords

Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
@pringelmann
pringelmann force-pushed the feat/noid/app-password-read-only branch from 181101d to c47fa12 Compare November 3, 2026 10:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant