   koding.mq.emit 'public-status','exit',req.params.data
   res.send "alright."
 
+app.get "/api/user/:username/flags/:flag", (req, res)->
+  {username, flag} = req.params
+  {JAccount}       = koding.models
+
+  JAccount.one "profile.nickname" : username, (err, account)->
+    if err or not account
+      state = false
+    else
+      state = account.checkFlag('super-admin') or account.checkFlag(flag)
+    res.end "#{state}"
 
 app.get '*', (req,res)->
   res.header 'Location', '/#!'+req.url

  root: __dirname
  models: [
    '../workers/social/lib/social/models/session.coffee'
    '../workers/social/lib/social/models/guest.coffee'
  ]
  mq: new Broker mqOptions

    fs.readFile "#{projectRoot}/website/index.html", (err, data) ->
      throw err if err
      res.send data

app.get "/status/:data",(req,res)->
  # req.params.data

