mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-10-23 11:08:54 +00:00
[Web][Tests] Add PHPUnit setup and imapsync module tests
This commit is contained in:
18 files changed
+3948
-1
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
// Stand-ins for the legacy ACL functions of data/web/inc/functions.inc.php, used by ContextTest only:
|
||||
// they record the call and answer from a fixed table.
|
||||
|
||||
use Mailcow\Tests\Support\LegacyAclCalls;
|
||||
|
||||
if (!function_exists('hasMailboxObjectAccess')) {
|
||||
function hasMailboxObjectAccess($username, $role, $object)
|
||||
{
|
||||
LegacyAclCalls::$calls[] = ['mailbox', $username, $role, $object];
|
||||
return $object === 'allowed@example.org';
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('hasDomainAccess')) {
|
||||
function hasDomainAccess($username, $role, $domain)
|
||||
{
|
||||
LegacyAclCalls::$calls[] = ['domain', $username, $role, $domain];
|
||||
return $domain === 'example.org';
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user