HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2011-05-23 611b1f0a94cd020cfc88047828c1829855b857db
Ticket #50, Formatierung, Queues in context.xml
6 files modified
109 ■■■■ changed files
hsarback/src/de/hsadmin/core/qserv/CommandShell.java 6 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/db/MySqlDatabaseProcessorFactory.java 4 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/email/EMailAddress.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/email/EMailAlias.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/user/UnixUserModuleImpl.java 11 ●●●● patch | view | raw | blame | history
hsarback/webapp/META-INF/context.xml 84 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/core/qserv/CommandShell.java
@@ -9,9 +9,9 @@
public class CommandShell
{
    private static boolean bExecute = true; // really execute or just store command and stdin?
    private static String executedCommands; // stored command and stdin
    private static String[] aEnvironment; // stored environment
    private static boolean bExecute = true;     // really execute or just store command and stdin?
    private static String executedCommands;     // stored command and stdin
    private static String[] aEnvironment;         // stored environment
    /** Set mode of real execution or just storing the command and stdin.
     * 
hsarback/src/de/hsadmin/mods/db/MySqlDatabaseProcessorFactory.java
@@ -50,10 +50,10 @@
        
        String aName = AbstractEntity.escapeString( db.getName() );
        String aOwner = AbstractEntity.escapeString( db.getOwner() );
        String aEncoding = AbstractEntity.escapeString( db.getSystemEncoding() );
//        String aEncoding = AbstractEntity.escapeString( db.getSystemEncoding() );
        JDBCProcessor aJDBCP = null;
        aJDBCP = createMySqlAdminProcessor();
        aJDBCP.addSQL( "ALTER DATABASE " + aName + " DEFAULT CHARACTER SET '" + aEncoding + "'" );
//        aJDBCP.addSQL( "ALTER DATABASE " + aName + " DEFAULT CHARACTER SET '" + aEncoding + "'" );
        aJDBCP.addSQL( "GRANT ALL ON " + aName + ".* TO '" + aOwner + "'@'%'" );
        // TODO: alte Admin-Rechte entziehen
        return aJDBCP;
hsarback/src/de/hsadmin/mods/email/EMailAddress.java
@@ -55,7 +55,7 @@
    @JoinColumn(name = "domain_id", columnDefinition = "integer", updatable = false)
    private Domain domain;
    
    @FieldValidation("[a-zA-Z0-9\\_\\-\\.\\|\\\"\\/\\@\\,\\+\\ ]*")
    @FieldValidation("[\\x20-\\x7E]*")
    @Column(name = "target", nullable= false)
    private String target;
hsarback/src/de/hsadmin/mods/email/EMailAlias.java
@@ -50,7 +50,7 @@
    @Column(updatable=false)
    private String name;
    @FieldValidation("[a-zA-Z0-9\\_\\-\\.\\|\\\"\\/\\@\\,\\+\\ ]*")
    @FieldValidation("[\\x20-\\x7E]*")
    @Column
    private String target;
hsarback/src/de/hsadmin/mods/user/UnixUserModuleImpl.java
@@ -225,14 +225,9 @@
    // throws an AuthorisationException if the login user has no write acess
    // on the pac of the given UnixUser
    private boolean hasFullAccessOnPacOf(UnixUser user) {
        // only pac admins (same name as pac) and the owner (customer) have
        // write access to the pac
        boolean isPacAdmin = getLoginUser().getName().equals(
                user.getPac().getName());
        boolean isCustomer = getLoginUser().getName().equals(
                user.getPac().getCustomer().getName());
        boolean isHostmaster = getLoginUser().hasHostmasterRole();
        return isPacAdmin || isCustomer || isHostmaster;
        return getLoginUser().hasHostmasterRole()
            || getLoginUser().getName().equals(user.getPac().getName())
            || getLoginUser().getName().equals(user.getPac().getCustomer().getName());
    }
    // throws an AuthorisationException if the login user has no write acess
hsarback/webapp/META-INF/context.xml
@@ -11,8 +11,88 @@
        type="javax.jms.QueueConnectionFactory"/>
    <ResourceLink
        name="jms/hsadminSystem-h81"
        global="jms/hsadminSystem-h81"
        name="jms/hsadminSystem-h01"
        global="jms/hsadminSystem-h01"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h02"
        global="jms/hsadminSystem-h02"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h03"
        global="jms/hsadminSystem-h03"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h04"
        global="jms/hsadminSystem-h04"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h05"
        global="jms/hsadminSystem-h05"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h06"
        global="jms/hsadminSystem-h06"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h07"
        global="jms/hsadminSystem-h07"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h08"
        global="jms/hsadminSystem-h08"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h50"
        global="jms/hsadminSystem-h50"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h51"
        global="jms/hsadminSystem-h51"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h52"
        global="jms/hsadminSystem-h52"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h53"
        global="jms/hsadminSystem-h53"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h54"
        global="jms/hsadminSystem-h54"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h55"
        global="jms/hsadminSystem-h55"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h56"
        global="jms/hsadminSystem-h56"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h57"
        global="jms/hsadminSystem-h57"
        type="javax.jms.Queue"/>
    <ResourceLink
        name="jms/hsadminSystem-h58"
        global="jms/hsadminSystem-h58"
        type="javax.jms.Queue"/>
    <ResourceLink