[Web] Allow a user to choose notification categories (junk folder, rejected mail, both/all) + user ACL

This commit is contained in:
andryyy
2020-11-28 17:41:48 +01:00
parent 752efa2188
commit ba20db2e08
13 changed files with 204 additions and 23 deletions

View File

@@ -332,6 +332,9 @@ function hasDomainAccess($username, $role, $domain) {
}
function hasMailboxObjectAccess($username, $role, $object) {
global $pdo;
if (empty($username) || empty($role) || empty($object)) {
return false;
}
if (!filter_var(html_entity_decode(rawurldecode($username)), FILTER_VALIDATE_EMAIL) && !ctype_alnum(str_replace(array('_', '.', '-'), '', $username))) {
return false;
}