diff --git a/Documentation/rest-api-accounts.txt b/Documentation/rest-api-accounts.txt index 18734751d5..00d4ca6892 100644 --- a/Documentation/rest-api-accounts.txt +++ b/Documentation/rest-api-accounts.txt @@ -8,13 +8,16 @@ link:rest-api.html[REST API]. Endpoints --------- -[[accounts_self_capabilities]] -GET /accounts/self/capabilities (Account Capabilities) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[[list-account-capabilities]] +GET /accounts/\{account-id\}/capabilities (List Account Capabilities) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Returns the global capabilities (such as `createProject` or -`createGroup`) that are enabled for the calling user. This can be used -by UI tools to discover if administrative features are available -to the caller, so they can hide (or show) relevant UI actions. +`createGroup`) that are enabled for the specified user. + +If the global capabilities for the calling user should be listed, +`self` can be used as account-id. This can be used by UI tools to +discover if administrative features are available to the caller, so +they can hide (or show) relevant UI actions. .Request ---- @@ -107,6 +110,25 @@ get::/accounts/self/capabilities?q=createGroup **** +[[ids]] +IDs +--- + +[[account-id]] +\{account-id\} +~~~~~~~~~~~~~~ +Identifier that uniquely identifies one account. + +This can be: + +* a string of the format "Full Name " +* just the email address ("email@example") +* a full name if it is unique ("Full Name") +* an account ID ("18419") +* a user name ("username") +* `self` for the calling user + + GERRIT ------ Part of link:index.html[Gerrit Code Review] diff --git a/Documentation/rest-api-groups.txt b/Documentation/rest-api-groups.txt index de2a909d70..669d3941f7 100644 --- a/Documentation/rest-api-groups.txt +++ b/Documentation/rest-api-groups.txt @@ -932,14 +932,14 @@ IDs [[account-id]] \{account-id\} ~~~~~~~~~~~~~~ -Identifier for an account. +Identifier that uniquely identifies one account. This can be: * a string of the format "Full Name " * just the email address ("email@example") -* a full name ("Full Name") -* an account id ("18419") +* a full name if it is unique ("Full Name") +* an account ID ("18419") * a user name ("username") [[group-id]] diff --git a/ReleaseNotes/ReleaseNotes-2.5.txt b/ReleaseNotes/ReleaseNotes-2.5.txt index c59f3dba23..023b4bf096 100644 --- a/ReleaseNotes/ReleaseNotes-2.5.txt +++ b/ReleaseNotes/ReleaseNotes-2.5.txt @@ -274,7 +274,7 @@ ad-hoc scripting use cases. ** link:http://gerrit-documentation.googlecode.com/svn/Documentation/2.5/rest-api-projects.html[list projects] ** link:http://gerrit-documentation.googlecode.com/svn/Documentation/2.5/rest-api-projects.html#suggest-projects[suggest projects] -** link:http://gerrit-documentation.googlecode.com/svn/Documentation/2.5/rest-api-accounts.html#accounts_self_capabilities[query +** link:http://gerrit-documentation.googlecode.com/svn/Documentation/2.5/rest-api-accounts.html#list-account-capabilities[query the global capabilities of the calling user] * Support link:http://gerrit-documentation.googlecode.com/svn/Documentation/2.5/rest-api.html#authentication[anonymous