classAdminPage(webapp2.RequestHandler):defget(self):user=users.get_current_user()ifuser:ifusers.is_current_user_admin():self.response.write('You are an administrator.')else:self.response.write('You are not an administrator.')else:self.response.write('You are not logged in.')
[[["わかりやすい","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-06 UTC。"],[[["The application can verify if the logged-in user is an administrator, which includes users with Viewer, Editor, Owner basic roles, or the App Engine App Admin predefined role."],["The `users.is_current_user_admin` function determines if the current user is an administrator, returning `True` if they are and can only be ran in first-generation runtimes in the App Engine standard environment."],["The provided code example demonstrates how to use the `users.is_current_user_admin` function within a web application to determine if a user has administrator privileges."],["The `login: admin` setting in the configuration file can be utilized to easily restrict access to specific parts of the app to administrators only."]]],[]]