Accept member accounts of more than 3 characters length in "run as"
command.
This commit is contained in:
parent
b2b192833c
commit
325ae31e08
@ -205,7 +205,7 @@ public class Transaction {
|
||||
return ticketUser.equals(pacName); // pac-admin
|
||||
}
|
||||
String memberAccountPrefix = Config.getInstance().getProperty("accountprefix.customer", "hsh00") + "-";
|
||||
if (ticketUser != null && (ticketUser.length() == 3 || (ticketUser.length() == 9 && ticketUser.startsWith(memberAccountPrefix)))) {
|
||||
if (ticketUser != null && (ticketUser.length() == 3 || (ticketUser.length() >= 9 && ticketUser.startsWith(memberAccountPrefix)))) {
|
||||
Query memberQuery = getEntityManager().createQuery("SELECT c FROM Customers c WHERE c.name = :membername");
|
||||
memberQuery.setParameter("membername", ticketUser.length() == 3 ? (memberAccountPrefix + ticketUser) : ticketUser);
|
||||
Customer member = (Customer) memberQuery.getSingleResult();
|
||||
|
Loading…
Reference in New Issue
Block a user