ACL rewrite

This commit is contained in:
2024-04-23 12:14:28 +02:00
parent d6c6572989
commit aea20b7a10
23 changed files with 435 additions and 180 deletions

View File

@@ -3,7 +3,6 @@
namespace Core\API;
use Core\Driver\Logger\Logger;
use Core\Driver\SQL\Query\Insert;
use Core\Objects\Context;
use Core\Objects\DatabaseEntity\TwoFactorToken;
use Core\Objects\TwoFactor\KeyBasedTwoFactorToken;
@@ -131,8 +130,14 @@ abstract class Request {
protected abstract function _execute(): bool;
// TODO: replace this function with two abstract methods: getDefaultPermittedGroups and getDescription
public static function getDefaultACL(Insert $insert): void { }
public static abstract function getDescription(): string;
public static function getDefaultPermittedGroups(): array {
return [];
}
public static function hasConfigurablePermissions(): bool {
return true;
}
protected function check2FA(?TwoFactorToken $tfaToken = null): bool {