Skip to content

Commit

Permalink
修复已购列表的权限问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zxy19 committed Jul 9, 2024
1 parent 31e8146 commit 5c5e7b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Api/Controller/history/ListHistoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ protected function data(Request $request, Document $document)
if (is_null($id)) {
$id = $actor->id;
} else {
$actor->assertCan("viewHistory");
if ($id != $actor->id)
$actor->assertCan("viewHistory");
}
$q = PurchaseHistory::where('user_id', $id)->whereIn("provider", StoreHelper::providersShowInHistory());
if ($type) {
Expand Down

0 comments on commit 5c5e7b0

Please sign in to comment.