honor caneditdomain flag correctly; corrected error messages; updated external URLs

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-11-20 12:22:03 +01:00
parent eb13796976
commit 777991e0e3
6 changed files with 37 additions and 26 deletions

View File

@@ -630,6 +630,10 @@ class SubDomains extends ApiCommand implements ResourceEntity
]);
$id = $result['id'];
if ($this->isAdmin() == false && (int)$result['caneditdomain'] == 0) {
throw new Exception(lng('error.domaincannotbeedited', [$result['domain']]), 406);
}
// parameters
$aliasdomain = $this->getParam('alias', true, 0);
$path = $this->getParam('path', true, $result['documentroot']);