Ron Huang avatar Ron Huang committed b674ce2

Added setup handler.

Comments (0)

Files changed (4)

               <a class="btn" href="/dump">Dump</a>
               <a class="btn" href="/cleanup">Cleanup</a>
               <a class="btn" href="/kaboom">Kaboom</a>
+              <a class="btn" href="/setup">Setup</a>
   login: admin
+- url: /setup
+  login: admin
+  script:
 - url: /dump
   login: admin
   - name: mode
   - name: name
   - name: position
-- kind: EntryPoint
-  properties:
-  - name: last_updated
-    direction: desc
+class SetupHandler(webapp.RequestHandler):
+  def get(self):
+    access = acl.Access(mode='role', name='user', class_name='MirrorHandler', action_name='get', flag=True)
+    access.put()
+    self.response.headers['content-type'] = 'text/plain'
+    self.response.out.write('user role added.')
 class DumpHandler(webapp.RequestHandler):
   def get(self):
     self.response.headers['content-type'] = 'text/plain'
   (r"/main", HomeHandler),
   (r"/kaboom", KaboomHandler),
   (r"/admin", AdminHandler),
+  (r"/setup", SetupHandler),
   (r"/dump", DumpHandler),
   (r"/cleanup", CleanupHandler),
   (r"/([^/]+).*", MirrorHandler)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.