HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2020-04-28 4671cbc996512e4a3b8d033ecaad2ae87c76b93a
max username length is 32 everywhere
3 files modified
7 ■■■■ changed files
hsarback/src/de/hsadmin/mods/db/DatabaseUser.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/db/MySqlUserModuleImpl.java 3 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/user/UnixUser.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/db/DatabaseUser.java
@@ -43,7 +43,7 @@
    @Column(name = "dbuser_id", columnDefinition = "integer", updatable=false, insertable=false)
    private long id;
    @AnnFieldIO(validation="[a-z0-9]{5}_[a-z0-9_]{1,}", rw=ReadWriteAccess.WRITEONCE)
    @AnnFieldIO(validation="[a-z0-9]{5}_[a-z0-9_]{1,26}", rw=ReadWriteAccess.WRITEONCE)
    @Column(name = "name", columnDefinition = "character varying(64)", updatable=false)
    private String name;
hsarback/src/de/hsadmin/mods/db/MySqlUserModuleImpl.java
@@ -26,9 +26,6 @@
        if (name.length() < 7 || name.charAt(5) != '_') {
            throw new AuthorisationException(loginUser, "add", newEntity);
        }
        if (name.length() > 16) {
            throw new HSAdminException("mysql database name max. length is 16 characters");
        }
        EntityManager em = getTransaction().getEntityManager();
        Query qPac = em.createQuery("SELECT obj FROM Pacs obj WHERE obj.name = :pacName");
        qPac.setParameter("pacName", name.substring(0, 5));
hsarback/src/de/hsadmin/mods/user/UnixUser.java
@@ -40,7 +40,7 @@
    @Column(name="userid", columnDefinition="integer", nullable=false, updatable=false)
    private long userId;
    @AnnFieldIO(validation="[a-z0-9]{5}(-[a-z0-9\\.\\_]{1,})?", rw=ReadWriteAccess.WRITEONCE)
    @AnnFieldIO(validation="[a-z0-9]{5}(-[a-z0-9\\.\\_]{1,26})?", rw=ReadWriteAccess.WRITEONCE)
    @Column(name="name", columnDefinition = "character varying(64)", unique=true, updatable=false)
    private String name;