참고: PHP 5는 2024년 1월 30일 지원 종료되었습니다. 기존 PHP 5 애플리케이션을 계속 실행하고 트래픽을 받을 수 있습니다. 그러나 지원 종료 날짜 이후에는 해당 런타임을 사용하는 애플리케이션의 재배포를 App Engine에서 차단할 수 있습니다.
지원되는 최신 PHP 버전으로 마이그레이션하는 것이 좋습니다.
애플리케이션은 현재 로그인한 사용자가 애플리케이션에 등록된 관리자인지 여부를 테스트할 수 있습니다. 관리자는 애플리케이션의 관리 콘솔에 액세스할 수 있는 사용자입니다. 관리 콘솔을 사용하여 관리자 역할이 있는 사용자를 관리할 수 있습니다.
현재 사용자가 애플리케이션의 관리자인 경우 UserService::isCurrentUserAdmin() 함수가 True를 반환합니다.
use google\appengine\api\users\User;
$user = UserService::getCurrentUser();if (isset($user) && UserService::isCurrentUserAdmin()) { return 'Welcome administrator.';}return 'You are not an administrator.';
팁: URL 핸들러의 login: adminlogin: admin 구성 요소를 사용하면 애플리케이션의 일부에 대한 액세스 권한을 관리자로 손쉽게 제한할 수 있습니다. 앱 구성을 참조하세요.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-03-26(UTC)"],[[["Applications can check if the currently signed-in user has administrator privileges."],["Administrators have access to the application's Administration Console for management tasks."],["The `UserService::isCurrentUserAdmin()` function determines if the current user is an administrator, returning `True` if they are."],["The `login: admin` configuration element can restrict access to parts of an application, limiting it to administrators."]]],[]]