throw new XPathException("Unknown function");
}
} else {
final SecurityManager securityManager = broker.getBrokerPool().getSecurityManager();
final String strPrincipal = args[0].getStringValue();
final Principal principal;
if(isCalledAs(qnGetAccountMetadataKeys.getLocalName()) || isCalledAs(qnGetAccountMetadata.getLocalName())) {
if(!currentUser.hasDbaRole() && !currentUser.getUsername().equals(strPrincipal)) {
throw new XPathException("You must be a DBA to retrieve metadata about other users, otherwise you may only retrieve metadata about yourself.");
}
principal = securityManager.getAccount(strPrincipal);