feat(followup-audio): separate uploader-only recording delete permission
This commit is contained in:
@@ -273,9 +273,8 @@ final class FollowupAudioStore
|
||||
$task = self::lockTask($taskId);
|
||||
$info = FollowupAudioAccess::actor($actor);
|
||||
FollowupAudioAccess::task($taskId, $actor, $info);
|
||||
if ((int) $info['root'] !== 1 && (int) $task['actor_id'] !== $actor) {
|
||||
throw new DomainException('仅上传者或超级管理员可删除录音');
|
||||
}
|
||||
$permissionReason = FollowupAudioAccess::deleteReason($task, $actor);
|
||||
if ($permissionReason !== '') { throw new DomainException($permissionReason); }
|
||||
if ((int) $task['version'] !== $version) { throw new DomainException('FOLLOWUP_AUDIO_VERSION_CONFLICT'); }
|
||||
$reason = self::deleteBlockReason($task);
|
||||
if ($reason !== '') { throw new DomainException($reason); }
|
||||
|
||||
Reference in New Issue
Block a user