Support wildcard topic in mail permissions
topic: null in a permission entry now matches any topic, allowing broad grants without specifying a specific topic. set-mail-permission topic param is now optional; omitting it stores null (wildcard). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,7 @@ export function load_mail_perms(file_path) {
|
||||
}
|
||||
|
||||
function check(user, to, topic) {
|
||||
return allowed.some(e => e.user === user && e.to === to && e.topic === topic);
|
||||
return allowed.some(e => e.user === user && e.to === to && (e.topic === topic || e.topic === null));
|
||||
}
|
||||
|
||||
function add(user, to, topic) {
|
||||
|
||||
Reference in New Issue
Block a user