REST API /accounts/self/capabilities

This JSON end point can be used by a client to determine global
server capabilities for the user, for example common names like
"createProject" or "createGroup".

The q parameter can be used to filter the set of capabilities to be
smaller than the set recognized by this version of Gerrit. Filtering
may decrease response time by avoiding looking at every possible
alternative for the caller.

Most results are boolean, and a field is only present when its
value is true. queryLimit is a range and is presented as a nested
JSON object with min and max members.

$ curl --user $USER --digest 'http://localhost:8080/a/accounts/self/capabilities?format=JSON'
)]}'
{
  "administrateServer": true,
  "queryLimit": {
    "min": 0,
    "max": 500
  },
  "createAccount": true,
  "createGroup": true,
  "createProject": true,
  "killTask": true,
  "viewCaches": true,
  "flushCaches": true,
  "viewConnections": true,
  "viewQueue": true,
  "startReplication": true
}

Change-Id: I4052ade1da986ee409cc0d532e872211b4301f2d
7 files changed