他の親の画像とPDFを見えませんが、会議詳細ページのURLわかったら、他の親の会議詳細ページ見えます

このコミットが含まれているのは:
守矢諏訪子 2021-11-29 16:10:40 +09:00
コミット f90687b58e
2個のファイルの変更22行の追加0行の削除

ファイルの表示

@ -359,6 +359,17 @@ class ChildrenController extends Controller {
return ['status_code' => 400];
}
// 親画面から他の親としてアクセスすれば、404となります。
$err = 'アクセスできません。';
if (request()->route()->action['as'] == 'cdp') {
abort_if(null === session()->get('fathers') || null === ($rel = FatherRelation::where('child_id', (int)$child_id)->where('father_id', (int)session()->get('fathers')['id'])->first()), 404, $err);
}
// 同じく子画面から他の親の詳細ページをアクセスすれば、404となります。
if (request()->route()->action['as'] == 'cdc') {
abort_if(null === session()->get('children') || (int)session()->get('children')['id'] != (int)$child_id, 404, $err);
}
if (request()->route()->action['as'] == 'cdp') {
if (null === ($params->father_relations = FatherRelation::select($father_relations_select)->where('child_id', (int)$child_id)->where('father_id', (int)$r->father_id)->first())) {
$params->father_relations = new \stdClass();

ファイルの表示

@ -648,6 +648,17 @@ class MeetingsController extends Controller {
return ['status_code' => 400];
}
// 親画面から他の親としてアクセスすれば、404となります。
$err = 'アクセスできません。';
if (request()->route()->action['as'] == 'mdp') {
abort_if(null === session()->get('fathers') || (int)session()->get('fathers')['id'] != $result->father_id, 404, $err);
}
// 同じく子画面から他の親の詳細ページをアクセスすれば、404となります。
if (request()->route()->action['as'] == 'mdc') {
abort_if(null === session()->get('children') || null === ($rel = FatherRelation::where('father_id', $result->father_id)->where('child_id', (int)session()->get('children')['id'])->first()), 404, $err);
}
if (null === ($result->meeting_image = MeetingImage::select($meeting_images_select)->where('meeting_id', (int)$result->id)->get())) {
$result->meeting_image = [];
}