• Aryan Noshirvnai's avatar
    Add Soundmarks: location-tied anthems with business/super admin roles · 79bdfe8f
    Aryan Noshirvnai authored
    New feature, distinct from the existing GeoDrop (any user dropping a
    song for others to find): a Soundmark is a curated anthem tied to a
    place. One with no owner is a super-admin-curated landmark; one with
    a business_owner_id is that business's location, and only its owner
    (or a super admin) can change its anthem.
    
    - User.role ("user" | "business_admin" | "super_admin") plus
      get_current_business_admin / get_current_super_admin dependencies.
      Super admin passes both checks - same privileges, elevated.
    - New soundmarks router: nearby detection (haversine against each
      soundmark's own trigger radius, not a caller-supplied search
      radius), cross-user anthem streaming (deliberately not scoped to
      the caller owning the underlying song, unlike /library/stream),
      business-owner song assignment, super-admin CRUD, a "public
      library" search across every user's songs (no such cross-user
      endpoint existed before - everything else is locked to the
      caller), and user role management (promote/demote, with owning a
      soundmark auto-promoting a plain user to business_admin so
      ownership isn't otherwise inaccessible to them).
    - GET /auth/me so the webapp can read the caller's role.
    
    25 new tests covering role gating, ownership enforcement, cross-user
    song picking/streaming, and radius-based nearby matching. Promoted
    dev-test-user to super_admin for webapp testing.
    Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
    79bdfe8f
Name
Last commit
Last update
..
versions Loading commit data...
README Loading commit data...
env.py Loading commit data...
script.py.mako Loading commit data...