HSAdmin Backend Domains, E-Mail, Datenbanken
Purodha
2013-04-02 325ae31e08b8aca7b1d32d975439c142fd866341
Accept member accounts of more than 3 characters length in "run as"
command.
1 files modified
2 ■■■ changed files
hsarback/src/de/hsadmin/core/model/Transaction.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/core/model/Transaction.java
@@ -205,7 +205,7 @@
            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();