How to set user admin using GAE dev application server?

I want to create an admin page for my GAE application. But I did not find a way to install the Admin user, so I can not enter the page I created and check the function. I tried the local admin console but no luck. How can i do this?

+3
source share
3 answers

The Google App Engine provides a fairly easy way to create a private admin section for your web application.

1.
Your app.yamlURL handler can have a login option in your URL to restrict visitors to only those users who are logged in, or simply to those who are administrators of the application.
If the parameter login: admin, as soon as the user has logged in, the handler checks whether the user is the administrator for the application. Otherwise, the user is presented with an error message; if the user is an administrator, the handler continues.
Here is a snippet of app.yaml where routes are /admin/.*limited by administration:

 - url: /admin/.*
   script: admin.py
   login: admin

2.
URL- , Dev , .

enter image description here

+7

( , ), .

0

You can only define admin pages only in your app.yaml application, for example:

- url: /secrets/
  script: /secrets/example.py
  login: admin

Admin is the one who is so defined in your appengine.google.com dashboard under the rights.

0
source

All Articles