ACL rewrite
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user