fixed #75
This commit is contained in:
parent
77a839d3d3
commit
3fb18c2927
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user