MCPcopy Create free account
hub / github.com/apache/tomcat / getRoles

Method getRoles

java/org/apache/catalina/realm/DataSourceRealm.java:471–484  ·  view source on GitHub ↗

Return the roles associated with the given username. @param username Username for which roles should be retrieved @return an array list of the role names

(String username)

Source from the content-addressed store, hash-verified

469 * @return an array list of the role names
470 */
471 protected ArrayList<String> getRoles(String username) {
472
473 // Ensure that we have an open database connection
474 Connection dbConnection = open();
475 if (dbConnection == null) {
476 return null;
477 }
478
479 try {
480 return getRoles(dbConnection, username);
481 } finally {
482 close(dbConnection);
483 }
484 }
485
486
487 /**

Callers 2

authenticateMethod · 0.95
getPrincipalMethod · 0.95

Calls 11

openMethod · 0.95
closeMethod · 0.95
isRoleStoreDefinedMethod · 0.95
nextMethod · 0.65
getStringMethod · 0.65
addMethod · 0.65
errorMethod · 0.65
prepareStatementMethod · 0.45
setStringMethod · 0.45
executeQueryMethod · 0.45
trimMethod · 0.45

Tested by

no test coverage detected