google app engine: how to add adminstrator account

2019-07-24 18:26发布

I am developing a web system on the google app engine. I would like to create an administrator account for the system such that he/she may login to set various system settings. But how do I create such an account in the first place? Thanks.

4条回答
来,给爷笑一个
2楼-- · 2019-07-24 19:09

One can add members to a Google Cloud project (App Engine included) and assign roles via the Google Cloud Console, section IAM & ADMIN (as of December 2016):

https://console.cloud.google.com/iam-admin

查看更多
Viruses.
3楼-- · 2019-07-24 19:19

The easiest way to authenticate users in a GAE app is to use the built in UserService.

You can protect pages in two ways:

  1. define a security constraint in web.xml
  2. Check UserService.isUserAdmin() and redirect to the loggin page

Note that you can choose to allow users to log in using this built in service with either OpenId or only Google Apps accounts. If you want to allow something else like Facebook authentication or your own username/password then you will need to build something more elaborate.

查看更多
女痞
4楼-- · 2019-07-24 19:20
  1. Go to the Admin console at https://appengine.google.com.
  2. Click Permissions in the left menu.
  3. Enter email of a new user, set the role to "Owner" and click "Invite user".

EDIT:

If you provide functionality within your app for administrators, you can:

  • simply hardcode an email of this person in your code, if you only have one administrator, or
  • add this person as an admin in Admin Console, then check if a user is admin in your code, if you use App Engine's User Service for authentication.
查看更多
再贱就再见
5楼-- · 2019-07-24 19:27

Google App Engine, you want to add a second app owner or other more limited access.

Log in to the console, go to IAM & admin tab with your project selected. Go to IAM on the left panel, select Add (top), in the slide-in enter the new members email, and select the role(s) you want to give them (Project Owner) and Save. They get an email and can accept the new role. You don't need to sign up for the full blown IAM identity & Organization.

查看更多
登录 后发表回答