示例#1
0
文件: app.py 项目: HunterLarco/sealed
  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))
示例#2
0
 def post(self, dictionary, method):
   api.delegate(self, dictionary, method, api.Permissions.Guest)
示例#3
0
	def post(self, dictionary, method):
		api.delegate(self, dictionary, method, api.Permissions.Admin)
示例#4
0
	def get(self, dictionary, method):
		api.delegate(self, dictionary, method, api.Permissions.Admin)
示例#5
0
 def run(self, dictionary, method):
   from lib.api import delegate, Permissions
   delegate(self, dictionary, method, Permissions.Guest)
示例#6
0
 def get(self, dictionary, method):
     api.delegate(self, dictionary, method, api.Permissions.Guest)