in src/main/java/org/apache/sling/serviceuser/webconsole/impl/ServiceUserWebConsolePlugin.java [698:771]
private void printServiceUsers(HttpServletRequest request, PrintWriter pw) throws LoginException {
pw.println("<form method='post' action='/system/console/serviceusers'>");
tableStart(pw, "Create Service User", 2);
String name = getParameter(request, PN_NAME, "");
textField(pw, "Service User Name", PN_NAME, name, "The name of the service user to create, can already exist");
tableRows(pw);
String userContextPath = getParameter(request, PN_USER_PATH, "");
textField(
pw,
"Intermediate Path",
PN_USER_PATH,
userContextPath,
"Optional: The intermediate path under which to create the user. Should start with system, e.g. system/myapp");
tableRows(pw);
String bundle = getParameter(request, PN_BUNDLE, "");
selectField(
pw,
"Bundle",
PN_BUNDLE,
bundle,
getBundles(),
"The bundle from which this service user will be useable");
tableRows(pw);
String serviceName = getParameter(request, PN_SUB_SERVICE, "");
textField(
pw,
"Sub Service Name",
PN_SUB_SERVICE,
serviceName,
"Optional: Allows for different permissions for different services within a bundle");
tableRows(pw);
String appPath = getParameter(request, PN_APP_PATH, "");
textField(
pw,
"Application Path",
PN_APP_PATH,
appPath,
"The application under which to create the OSGi Configuration for the Service User Mapping, e.g. /apps/myapp");
tableRows(pw);
List<Pair<String, String>> privileges = getPrivileges(request);
printPrivilegeSelect(
pw, "ACLs", privileges, getSupportedPrivileges(request), "Set the privileges for this service user");
tableRows(pw);
pw.println("<td></td>");
pw.println("<td><input type='submit' value='Create / Update'/></td>");
tableEnd(pw);
pw.println("</form>");
pw.println("<br/><br/>");
// Service Users
List<Mapping> activeMappings = mapper.getActiveMappings();
tableStart(pw, "Active Service Users", 3);
pw.println("<th>Name</th>");
pw.println("<th>Bundle</th>");
pw.println("<th>SubService</th>");
printPrincipals(activeMappings, pw);
tableEnd(pw);
pw.println(BR);
}