Ticket #50, Formatierung, Queues in context.xml

This commit is contained in:
Peter Hormanns 2011-05-23 17:40:08 +00:00
parent 350897f163
commit 611b1f0a94
6 changed files with 92 additions and 17 deletions

View File

@ -50,10 +50,10 @@ public class MySqlDatabaseProcessorFactory implements EntityProcessorFactory {
String aName = AbstractEntity.escapeString( db.getName() ); String aName = AbstractEntity.escapeString( db.getName() );
String aOwner = AbstractEntity.escapeString( db.getOwner() ); String aOwner = AbstractEntity.escapeString( db.getOwner() );
String aEncoding = AbstractEntity.escapeString( db.getSystemEncoding() ); // String aEncoding = AbstractEntity.escapeString( db.getSystemEncoding() );
JDBCProcessor aJDBCP = null; JDBCProcessor aJDBCP = null;
aJDBCP = createMySqlAdminProcessor(); 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 + "'@'%'" ); aJDBCP.addSQL( "GRANT ALL ON " + aName + ".* TO '" + aOwner + "'@'%'" );
// TODO: alte Admin-Rechte entziehen // TODO: alte Admin-Rechte entziehen
return aJDBCP; return aJDBCP;

View File

@ -55,7 +55,7 @@ public class EMailAddress extends AbstractEntity implements Serializable {
@JoinColumn(name = "domain_id", columnDefinition = "integer", updatable = false) @JoinColumn(name = "domain_id", columnDefinition = "integer", updatable = false)
private Domain domain; private Domain domain;
@FieldValidation("[a-zA-Z0-9\\_\\-\\.\\|\\\"\\/\\@\\,\\+\\ ]*") @FieldValidation("[\\x20-\\x7E]*")
@Column(name = "target", nullable= false) @Column(name = "target", nullable= false)
private String target; private String target;

View File

@ -50,7 +50,7 @@ public class EMailAlias extends AbstractEntity implements Serializable {
@Column(updatable=false) @Column(updatable=false)
private String name; private String name;
@FieldValidation("[a-zA-Z0-9\\_\\-\\.\\|\\\"\\/\\@\\,\\+\\ ]*") @FieldValidation("[\\x20-\\x7E]*")
@Column @Column
private String target; private String target;

View File

@ -225,14 +225,9 @@ public class UnixUserModuleImpl extends AbstractModuleImpl {
// throws an AuthorisationException if the login user has no write acess // throws an AuthorisationException if the login user has no write acess
// on the pac of the given UnixUser // on the pac of the given UnixUser
private boolean hasFullAccessOnPacOf(UnixUser user) { private boolean hasFullAccessOnPacOf(UnixUser user) {
// only pac admins (same name as pac) and the owner (customer) have return getLoginUser().hasHostmasterRole()
// write access to the pac || getLoginUser().getName().equals(user.getPac().getName())
boolean isPacAdmin = getLoginUser().getName().equals( || getLoginUser().getName().equals(user.getPac().getCustomer().getName());
user.getPac().getName());
boolean isCustomer = getLoginUser().getName().equals(
user.getPac().getCustomer().getName());
boolean isHostmaster = getLoginUser().hasHostmasterRole();
return isPacAdmin || isCustomer || isHostmaster;
} }
// throws an AuthorisationException if the login user has no write acess // throws an AuthorisationException if the login user has no write acess

View File

@ -11,8 +11,88 @@
type="javax.jms.QueueConnectionFactory"/> type="javax.jms.QueueConnectionFactory"/>
<ResourceLink <ResourceLink
name="jms/hsadminSystem-h81" name="jms/hsadminSystem-h01"
global="jms/hsadminSystem-h81" 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"/> type="javax.jms.Queue"/>
<ResourceLink <ResourceLink