In GAE, I want to know when the user is an admin of the application,
to make privilege as admin. I saw the appengine api user, and gluon/
contrib/gae_google_account.py and the class GaeGoogleAccount. I think
if I add something like this do the job:

def is_user_admin(self):
        is_admin=False
        user = users.get_current_user()
        if user:
            is_admin = is_current_user_admin()
            if is_admin!=True:
                is_admin=False

        return is_admin

Now the question:

I want to integrate this in decorator:
@auth.requires_membership(GROUPADMIN), but i not familiar with this,
and this is sensible zone. Any ideas?

Reply via email to