0

I used "gae.api.users" to check if the logged users was me (users.is_current_user_admin());-) But this api is no more available. How can I do the same kind of thing with GAE/py37 ?

manatlan
  • 1,091
  • 1
  • 9
  • 18

1 Answers1

1

From the Users section of the Understanding differences between Python 2 and Python 3 on the App Engine standard environment guide:

The Users service is not available in Python 3. You can use any HTTP-based authentication mechanism, such as:

  • Google Identity Platform, which provides many options for authentication and authorization of Google user accounts.
  • Firebase Authentication, which provides authentication using username/password and federated identity using Google, Facebook, Twitter, and more.

    Note: Because the Users service is not available, it is not possible to use app.yaml to make URLs accessible only by administrators.

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
  • 1
    From what I read, the linked products provide authoristaion but not access-control to individual functions in our systems. Many of us need to actually know the current user so that we, or assigned users, can provide access control. The above links are also marketing type documents rather than being useful for developers. Are there any (api) reference documents available? – David Freeman Oct 29 '18 at 04:27
  • @DavidFreeman Click on the big blue `View Documentation` button and/or check the left navigation bar for `APIs and References`. Sorry, Google's quote, not mine. Yeah, it does require some work, it's not as simple as the Users API. The alternative is to stick w/ standard env python 2.7 - the only environment which ever supported the Users API. – Dan Cornilescu Oct 30 '18 at 01:54
  • Thanks @Dan Cornilescu, hope I didn't come across too badly. Unfortunately Google has informed me "unfortunately multitenancy service is not supported at Python 3 at this moment" so all this is redundant for me going forward. – David Freeman Oct 31 '18 at 02:13
  • No worries. Lots of differences, python 3.7 is IMHO closer to the flexible environment. See this answer (similar complaints, only about the logging service) for some links potentially useful to get a better understanding of the 2nd generation standard environment: https://stackoverflow.com/a/53075687/4495081. I'll probably pull that portion as a separate Q&A for easier reference... – Dan Cornilescu Oct 31 '18 at 03:12