Skip to content

[Nostr] Rebuild permissions table for strict per-profile isolation #59

@shadowbipnode

Description

@shadowbipnode

Rebuild nostr_permissions to remove the legacy UNIQUE(origin, action) constraint and enforce UNIQUE(profile_id, origin, action).

Current state:

  • profile_id column exists
  • application helpers query by active profile_id
  • unique index on (profile_id, origin, action) exists
  • legacy UNIQUE(origin, action) still exists from the original table schema

Goal:

  • safely migrate existing permissions into a new table
  • preserve existing permission rows
  • remove legacy global uniqueness constraint
  • enforce strict per-profile NIP-07 permission isolation

This should be done carefully because it touches security-sensitive NIP-07 permission persistence.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions