Esempio n. 1
0
  def run(self, dictionary, method):
    from google.appengine.api import users

    user = users.get_current_user()

    if user and users.is_current_user_admin():
      api.delegate(self, dictionary, method, api.Permissions.Admin)
      return
        
    self.response.headers['Content-Type'] = "application/javascript"
    self.response.out.write(api.response.throw(002, compiled=True))
Esempio n. 2
0
 def post(self, dictionary, method):
   api.delegate(self, dictionary, method, api.Permissions.Guest)
Esempio n. 3
0
	def post(self, dictionary, method):
		api.delegate(self, dictionary, method, api.Permissions.Admin)
Esempio n. 4
0
	def get(self, dictionary, method):
		api.delegate(self, dictionary, method, api.Permissions.Admin)
Esempio n. 5
0
 def run(self, dictionary, method):
   from lib.api import delegate, Permissions
   delegate(self, dictionary, method, Permissions.Guest)
Esempio n. 6
0
 def get(self, dictionary, method):
     api.delegate(self, dictionary, method, api.Permissions.Guest)