From 3fb18c2927f14a0ff0c75d21d9d0aaa8addf6ef4 Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Fri, 28 Oct 2011 11:03:27 +0000 Subject: [PATCH] fixed #75 --- hsarback/src/de/hsadmin/remote/RoleRemote.java | 10 ++++++++-- hsarweb/src/texts/main.properties | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/hsarback/src/de/hsadmin/remote/RoleRemote.java b/hsarback/src/de/hsadmin/remote/RoleRemote.java index 1deba2a..dce073c 100644 --- a/hsarback/src/de/hsadmin/remote/RoleRemote.java +++ b/hsarback/src/de/hsadmin/remote/RoleRemote.java @@ -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); diff --git a/hsarweb/src/texts/main.properties b/hsarweb/src/texts/main.properties index 8d1c4cf..3ef0f73 100644 --- a/hsarweb/src/texts/main.properties +++ b/hsarweb/src/texts/main.properties @@ -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