feat: roles/permissions system and Nostr profile display on admin users
Introduce granular role-based permissions with SuperAdmin env override, admin roles UI, and permission-gated API routes. Fix admin user Nostr metadata by batching relay profile fetches, normalizing npub pubkeys to hex, and adding reusable NostrAvatar/useNostrProfile components. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+5
-2
@@ -1,5 +1,8 @@
|
||||
# Admin pubkeys (comma-separated hex pubkeys)
|
||||
ADMIN_PUBKEYS=npub1examplepubkey1,npub1examplepubkey2
|
||||
# SuperAdmin pubkeys (comma-separated hex or npub). SuperAdmins always have every
|
||||
# permission, are env-only, and can never be edited or removed through the UI.
|
||||
# SUPERADMIN_PUBKEYS replaces the older ADMIN_PUBKEYS. If SUPERADMIN_PUBKEYS is
|
||||
# unset, the app falls back to ADMIN_PUBKEYS so existing deployments keep working.
|
||||
SUPERADMIN_PUBKEYS=npub1examplepubkey1,npub1examplepubkey2
|
||||
|
||||
# Nostr relays (comma-separated)
|
||||
RELAYS=wss://relay.damus.io,wss://nos.lol,wss://relay.nostr.band
|
||||
|
||||
Reference in New Issue
Block a user