mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
fix(audit): record organization key internal id as audit actor
Organization API keys use the same key role as standard keys, so the synthetic user with no id was cloned as the audit actor, leaving an empty actor id and internal id on audit entries. Extend the audit actor enrichment to cover organization keys as well, using the already-loaded key document's id and sequence.
This commit is contained in:
1 parent
ac44835f6c
commit
4fe26dc30f
1 file changed
+1
-1
@@ -226,7 +226,7 @@ Http::init()
|
||||
default => ACTOR_TYPE_KEY_ORGANIZATION,
|
||||
});
|
||||
|
||||
if ($apiKey->getType() === API_KEY_STANDARD) {
|
||||
if ($apiKey->getType() === API_KEY_STANDARD || $apiKey->getType() === API_KEY_ORGANIZATION) {
|
||||
$userClone
|
||||
->setAttribute('$id', $dbKey->getId())
|
||||
->setAttribute('$sequence', $dbKey->getSequence());
|
||||
|
||||
Reference in new issue
Block a user