mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
feat(admin-api): expose notification_preferences as read-only
Resolve the earlier open question by mapping the profile-settings domain's notification toggles to the existing notification_preferences table (primary key user_id, no sensitive columns). Read-only, gated on view_users, with a test covering read access and rejected writes.
This commit is contained in:
1 parent
77f2718fdd
commit
25b7c6238e
2 files changed
+16
No files matched your search
@@ -40,6 +40,7 @@ const resources: Record<string, ResourceRule> = {
|
||||
quiz_answers: { read: ['view_users', 'view_activity'] },
|
||||
sent_dares: { read: ['view_users', 'view_activity', 'view_chats'] },
|
||||
dare_messages: { read: ['view_chats', 'view_activity'] },
|
||||
notification_preferences: { read: 'view_users', idColumn: 'user_id' },
|
||||
};
|
||||
|
||||
function identifier(value: string): string {
|
||||
|
||||
Reference in new issue
Block a user