This commit is contained in:
Peter Hormanns 2011-10-28 11:03:27 +00:00
parent 77a839d3d3
commit 3fb18c2927
2 changed files with 10 additions and 3 deletions

View File

@ -13,6 +13,7 @@ import de.hsadmin.core.model.TicketAuthentication;
import de.hsadmin.core.model.Transaction;
import de.hsadmin.core.util.Config;
import de.hsadmin.mods.dom.Domain;
import de.hsadmin.mods.pac.Pac;
public class RoleRemote implements IRemote {
@ -31,7 +32,8 @@ public class RoleRemote implements IRemote {
String role = "USER";
String accoutPrefixCustomer = Config.getInstance().getProperty("accountprefix.customer");
String accoutPrefixHostmaster = Config.getInstance().getProperty("accountprefix.hostmaster");
String pacName = transaction.getLoginUser().getPac().getName();
Pac pac = transaction.getLoginUser().getPac();
String pacName = pac.getName();
if (accoutPrefixCustomer.equals(pacName)) {
role = "CUSTOMER";
}
@ -39,7 +41,11 @@ public class RoleRemote implements IRemote {
role = "HOSTMASTER";
}
if (user.equals(pacName)) {
role = "PAC_ADMIN";
if (pac.isDynamicWeb()) {
role = "PAC_ADMIN_DW";
} else {
role = "PAC_ADMIN_SW";
}
}
if (role.equals("USER")) {
GenericModuleImpl module = new GenericModuleImpl(transaction);

View File

@ -8,6 +8,7 @@ new=new
modules.NONE=de.hsadmin.web.HomeModule
modules.USER=de.hsadmin.web.HomeModule
modules.DOM_ADMIN=de.hsadmin.web.DomainReadonlyModule,de.hsadmin.web.EMailAddressModule,de.hsadmin.web.HomeModule
modules.PAC_ADMIN=de.hsadmin.web.UnixUserModule,de.hsadmin.web.DomainModule,de.hsadmin.web.EMailAddressModule,de.hsadmin.web.EMailAliasModule,de.hsadmin.web.MysqlDatabaseModule,de.hsadmin.web.MysqlUserModule,de.hsadmin.web.PgsqlDatabaseModule,de.hsadmin.web.PgsqlUserModule,de.hsadmin.web.QueueTaskModule
modules.PAC_ADMIN_DW=de.hsadmin.web.UnixUserModule,de.hsadmin.web.DomainModule,de.hsadmin.web.EMailAddressModule,de.hsadmin.web.EMailAliasModule,de.hsadmin.web.MysqlDatabaseModule,de.hsadmin.web.MysqlUserModule,de.hsadmin.web.PgsqlDatabaseModule,de.hsadmin.web.PgsqlUserModule,de.hsadmin.web.QueueTaskModule
modules.PAC_ADMIN_SW=de.hsadmin.web.UnixUserModule,de.hsadmin.web.DomainModule,de.hsadmin.web.EMailAddressModule,de.hsadmin.web.EMailAliasModule,de.hsadmin.web.QueueTaskModule
modules.CUSTOMER=de.hsadmin.web.PacketReadonlyModule,de.hsadmin.web.UnixUserModule,de.hsadmin.web.DomainModule,de.hsadmin.web.EMailAddressModule,de.hsadmin.web.EMailAliasModule,de.hsadmin.web.MysqlDatabaseModule,de.hsadmin.web.MysqlUserModule,de.hsadmin.web.PgsqlDatabaseModule,de.hsadmin.web.PgsqlUserModule,de.hsadmin.web.QueueTaskModule
modules.HOSTMASTER=de.hsadmin.web.PacketReadonlyModule,de.hsadmin.web.UnixUserModule,de.hsadmin.web.DomainModule,de.hsadmin.web.EMailAddressModule,de.hsadmin.web.EMailAliasModule,de.hsadmin.web.MysqlDatabaseModule,de.hsadmin.web.MysqlUserModule,de.hsadmin.web.PgsqlDatabaseModule,de.hsadmin.web.PgsqlUserModule,de.hsadmin.web.QueueTaskModule