권한 없는 사용자의 메뉴 접근 방지를 위한 코드 추가

This commit is contained in:
2025-07-23 16:55:26 +09:00
parent cc2ee8cbb3
commit 99a9a6fd42
4 changed files with 30 additions and 11 deletions

View File

@ -0,0 +1,13 @@
<?php
if (!isset($_SESSION['user_id'])) exit; //페이지 직접 실행 방지
// 권한부여 및 체크
$pageAuth = array(
'abc',
'firstgarden',
'bakery'
);
if ( !in_array($_SESSION['user_id'], $pageAuth) ) {
alert('권한이 없습니다', false);
}
?>