コード例 #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
ファイル: main.py プロジェクト: HunterLarco/The-Craft-of-Tea
 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
ファイル: main.py プロジェクト: HunterLarco/The-Craft-of-Tea
	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)