bug 4816: move permission CAN_IMPORT_MASTERDATA to SERVER_ACTIONS

This commit is contained in:
Thomas Wiese committed 2018-12-06 15:12:34 +01:00
1 parent 01f8d1ccf4
commit f27abc43c4
3 files changed
+5 -9

No files matched your search

@@ -137,11 +137,6 @@ public class SecuredDomainType extends HasPermissionsImpl {
/**
* type-relative identifier is the device configuration name
*/
public static final HasPermissions RACE_MANAGER_APP_DEVICE_CONFIGURATION = new SecuredDomainType("RACE_MANAGER_APP_DEVICE_CONFIGURATION", IdentifierStrategy.TO_SPECIFY);
public static final HasPermissions RACE_MANAGER_APP_DEVICE_CONFIGURATION = new SecuredDomainType("RACE_MANAGER_APP_DEVICE_CONFIGURATION", IdentifierStrategy.NAMED);
/**
* Create required to do MasterDataImport, type-relative identifier is the servername
*/
public static final HasPermissions CAN_IMPORT_MASTERDATA = new SecuredDomainType(
"CAN_REPLAY_DURING_LIVE_RACES", IdentifierStrategy.TO_SPECIFY);
}
@@ -5458,8 +5458,8 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
final boolean compress, final boolean exportWind, final boolean exportDeviceConfigurations,
String targetServerUsername, String targetServerPassword) {
// FIXME should the targetserver also check this?
SecurityUtils.getSubject().isPermitted(SecuredDomainType.CAN_IMPORT_MASTERDATA
.getStringPermissionForObjects(DefaultActions.CREATE, ServerInfo.getName()));
SecurityUtils.getSubject().isPermitted(SecuredSecurityTypes.SERVER
.getStringPermissionForObjects(ServerActions.CAN_IMPORT_MASTERDATA, ServerInfo.getName()));
String token = getTokenForServer(urlAsString, targetServerUsername, targetServerPassword);
@@ -54,7 +54,8 @@ public class SecuredSecurityTypes extends HasPermissionsImpl {
CONFIGURE_LOCAL_SERVER,
CONFIGURE_REMOTE_INSTANCES,
IMPORT_MASTER_DATA,
CREATE_OBJECT
CREATE_OBJECT,
CAN_IMPORT_MASTERDATA
}
/**