0
votes

Is it possible to retrieve the members of a google cloud project and their permissions via an api? I'm doing this because I want to see if the current signed in user of my app has permission to access the cloud storage section of the project.

The user is authenticated via OAuth2. I interact with cloud storage through an Amazon s3 library that has the endpoint changed.

1

1 Answers

0
votes

You can secure the page so that only admins can access it or check programmably.

from google.appengine.api import users

user = users.get_current_user()

if user:
    print 'Welcome, %s!' % user.nickname()
    if users.is_current_user_admin():
        print '<a href="/admin/">Go to admin area</a>'