On Thursday, July 9, 2015 at 6:56:04 PM UTC+3, Richard Cheesmar wrote:
>
>
>
>    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
>
>
I have this in app.yaml

- url: /admin.*
  script: main.app
  login: admin
  auth_fail_action: unauthorized

 

>
> 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?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/3af88204-64ee-4d17-9b69-383268e39caf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to