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

@@ -33,7 +33,6 @@ namespace Core\API\ApiKey {
use Core\API\Traits\Pagination;
use Core\Driver\SQL\Condition\Compare;
use Core\Driver\SQL\Condition\CondAnd;
use Core\Driver\SQL\Query\Insert;
use Core\Objects\Context;
use Core\Objects\DatabaseEntity\ApiKey;
@@ -61,8 +60,8 @@ namespace Core\API\ApiKey {
return $this->success;
}
public static function getDefaultACL(Insert $insert): void {
$insert->addRow(self::getEndpoint(), [], "Allows users to create new API-Keys", true);
public static function getDescription(): string {
return "Allows users to create new API-Keys";
}
}
@@ -106,8 +105,8 @@ namespace Core\API\ApiKey {
return $this->success;
}
public static function getDefaultACL(Insert $insert): void {
$insert->addRow(self::getEndpoint(), [], "Allows users to fetch new API-Keys", true);
public static function getDescription(): string {
return "Allows users to fetch their API-Keys";
}
}
@@ -134,8 +133,8 @@ namespace Core\API\ApiKey {
return $this->success;
}
public static function getDefaultACL(Insert $insert): void {
$insert->addRow(self::getEndpoint(), [], "Allows users to refresh API-Keys", true);
public static function getDescription(): string {
return "Allows users to refresh their API-Keys";
}
}
@@ -158,8 +157,8 @@ namespace Core\API\ApiKey {
return $this->success;
}
public static function getDefaultACL(Insert $insert): void {
$insert->addRow(self::getEndpoint(), [], "Allows users to revoke API-Keys", true);
public static function getDescription(): string {
return "Allows users to revoke their API-Keys";
}
}
}