Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/com/gitblit/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ public static enum RpcRequest {
// Order is important here. anything after LIST_SETTINGS requires
// administrator privileges and web.allowRpcManagement.
CLEAR_REPOSITORY_CACHE, REINDEX_TICKETS, GET_PROTOCOL, LIST_REPOSITORIES, LIST_BRANCHES, GET_USER,
FORK_REPOSITORY, LIST_REPOSITORY_BRANCHES, LIST_SETTINGS,
FORK_REPOSITORY, LIST_SETTINGS,
CREATE_REPOSITORY, EDIT_REPOSITORY, DELETE_REPOSITORY,
LIST_USERS, CREATE_USER, EDIT_USER, DELETE_USER,
LIST_TEAMS, CREATE_TEAM, EDIT_TEAM, DELETE_TEAM,
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/com/gitblit/servlet/RpcServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,18 +328,6 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
Collection<RegistrantAccessPermission> permissions = deserialize(request, response,
RpcUtils.REGISTRANT_PERMISSIONS_TYPE);
result = gitblit.setTeamAccessPermissions(model, permissions);
} else if (RpcRequest.LIST_REPOSITORY_BRANCHES.equals(reqType)) {

// list all branches for the given repository
Repository repository = gitblit.getRepository(objectName);
List<RefModel> refs = JGitUtils.getLocalBranches(repository, false, -1);

List<String> branches = new ArrayList<>();
for (RefModel ref : refs) {
branches.add(ref.getName());
}
repository.close();
result = branches;
} else if (RpcRequest.LIST_FEDERATION_REGISTRATIONS.equals(reqType)) {
// return the list of federation registrations
if (allowAdmin) {
Expand Down
2 changes: 0 additions & 2 deletions src/site/rpc.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ The Gitblit API includes methods for retrieving and interpreting RSS feeds. The
<tr><td>Gitblit v1.3.1</td><td>6</td></tr>
<tr><td>Gitblit v1.4.0</td><td>7</td></tr>
<tr><td>Gitblit v1.6.0</td><td>8</td></tr>
<tr><td>Gitblit v1.9.0</td><td>9</td></tr>
</tbody>
</table>

Expand Down Expand Up @@ -105,7 +104,6 @@ Use *SET_REPOSITORY_TEAM_PERMISSIONS* instead.
<tr><td><s>SET_REPOSITORY_TEAMS</s></td><td><s>repository name</s></td><td><em><s>admin</s></em></td><td><s>2</s></td><td><s>List&lt;String&gt;</s></td><td>-</td></tr>
<tr><td>LIST_REPOSITORY_TEAM_PERMISSIONS</td><td>repository name</td><td><em>admin</em></td><td>5</td><td>-</td><td>List&lt;String&gt;</td></tr>
<tr><td>SET_REPOSITORY_TEAM_PERMISSIONS</td><td>repository name</td><td><em>admin</em></td><td>5</td><td>List&lt;String&gt;</td><td>-</td></tr>
<tr><td>LIST_REPOSITORY_BRANCHES</td><td>repository name</td><td><em>-</em></td><td>9</td><td>-</td><td>List&lt;String&gt;</td></tr>
<tr><td>LIST_SETTINGS</td><td>-</td><td><em>admin</em></td><td>1</td><td>-</td><td>ServerSettings (management keys)</td></tr>
<tr><td>CLEAR_REPOSITORY_CACHE</td><td>-</td><td><em>-</em></td><td>4</td><td>-</td><td>-</td></tr>
<tr><td>REINDEX_TICKETS</td><td>repository name</td><td><em>-</em></td><td>7</td><td>-</td><td>-</td></tr>
Expand Down