set webspace groupid to main user userid
This commit is contained in:
parent
0f070ab8bb
commit
8ae270f887
@ -8,13 +8,15 @@ import java.util.regex.Pattern;
|
|||||||
|
|
||||||
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.MANAGED_WEBSPACE;
|
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.MANAGED_WEBSPACE;
|
||||||
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.UNIX_USER;
|
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.UNIX_USER;
|
||||||
|
import static net.hostsharing.hsadminng.hs.validation.IntegerProperty.integerProperty;
|
||||||
|
|
||||||
class HsManagedWebspaceHostingAssetValidator extends HostingAssetEntityValidator {
|
class HsManagedWebspaceHostingAssetValidator extends HostingAssetEntityValidator {
|
||||||
public HsManagedWebspaceHostingAssetValidator() {
|
public HsManagedWebspaceHostingAssetValidator() {
|
||||||
super(
|
super(
|
||||||
MANAGED_WEBSPACE,
|
MANAGED_WEBSPACE,
|
||||||
AlarmContact.isOptional(),
|
AlarmContact.isOptional(),
|
||||||
NO_EXTRA_PROPERTIES); // TODO.impl: groupid missing, should be equal to main user
|
integerProperty("groupid").readOnly()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -43,6 +45,7 @@ class HsManagedWebspaceHostingAssetValidator extends HostingAssetEntityValidator
|
|||||||
.prepareForSave()
|
.prepareForSave()
|
||||||
.saveUsing(emw::persist)
|
.saveUsing(emw::persist)
|
||||||
.validateContext();
|
.validateContext();
|
||||||
|
webspaceAsset.getConfig().put("groupid", unixUserAsset.getConfig().get("userid"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,9 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
|||||||
"type": "MANAGED_WEBSPACE",
|
"type": "MANAGED_WEBSPACE",
|
||||||
"identifier": "fir10",
|
"identifier": "fir10",
|
||||||
"caption": "some separate ManagedWebspace HA",
|
"caption": "some separate ManagedWebspace HA",
|
||||||
"config": {}
|
"config": {
|
||||||
|
"groupid": 1000000
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"""))
|
"""))
|
||||||
.header("Location", matchesRegex("http://localhost:[1-9][0-9]*/api/hs/hosting/assets/[^/]*"))
|
.header("Location", matchesRegex("http://localhost:[1-9][0-9]*/api/hs/hosting/assets/[^/]*"))
|
||||||
|
Loading…
Reference in New Issue
Block a user