|
I have uploaded a gae app for testing to production. I need to est the admin access. I have added two email addresses via permissions and set them as owners. I have a decorator which is called to check admin user and this is called properly on the local development machine.
I login to my app using one of the emails in permissions and then try to access an admin page and get the following: Error: Unauthorized Your client does not have permission to the requested URL /admin/delete-search-indexes. Am I missing something simple or is it that Google have to make everything difficult to understand? |
I have uploaded a gae app for testing to production. I need to est the admin access. I have added two email addresses via permissions and set them as owners.
I have a decorator which is called to check admin user and this is called properly on the local development machine.
def admin_required(handler):
"""
Decorator for checking if there's an admin user
Assigned Google App admin only NOT users with admin permissions
"""
def check_admin(self, *args, **kwargs):
"""
Admin decorator
"""
logging.info(users.is_current_user_admin())
if not users.is_current_user_admin():
self.redirect_to('home')
else:
return handler(self, *args, **kwargs)
return check_admin