Skip to content

Scope notes and settings per user #24

Closed

Description

@gnacho

The notes and settings tables have no user dimension, and there is no user allowlist in the config. Any user who authenticates with a valid OpenCloud credential reads and writes every note of the instance. The web extension is unaffected, but the data model is effectively single-user.

Verified in the code: ListNotes selects from notes with no user filter, CreateNote inserts no user, GetSettings reads settings globally. The production database is at PRAGMA user_version = 0.

Expected:

  • notes and settings carry the authenticated user, and every read/write is scoped to it
  • A user can no longer read, update or delete another user notes by id
  • Existing rows are migrated to a configured owner instead of becoming invisible
  • The migration is numbered and versioned with PRAGMA user_version, with a verified backup taken before it runs

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions